繁体   English   中英

F#Canopy - 我如何使用“上下文”测试?

[英]F# Canopy - how can I use the “context” tests?

我对如何利用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.

@Eugene Fotin,指出我的语法错误“:”。 我已修复此问题,构建错误消失了。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM