【发布时间】:2014-07-28 07:31:50
【问题描述】:
我不知道如何使用 Canopy API 格式化“上下文”测试。
以下网站列出了示例,但我无法使用以下代码构建我的程序。我尝试了其他缩进,没有任何变化。
参考:http://lefthandedgoat.github.io/canopy/testing.html
context: "Change text in the fields"
once(fun _ -> contains "98402" (read "#ZipCodeID"))
before(fun _ -> "#FirstNameID" << "Paul")
after(fun _ -> "#CityID" == "Tacoma")
lastly(fun _ -> "#StateID" == "WA")
这会产生以下错误:
Error 1 Incomplete structured construct at or before this point in lambda expression. Expected incomplete structured construct at or before this point or other token.
【问题讨论】:
-
:在context: "..."中是多余的。 -
啊,是的,我正在测试并在发布此问题之前添加了这一点。但是,您提到我的语法错误,导致我遇到了另一个问题。谢谢,我会在几分钟后发布我的新问题。
标签: f# canopy-web-testing