3
我難以理解如何使用Canopy API來格式化「上下文」測試。F#Canopy - 如何使用「上下文」測試?
以下網站列出了一些示例,但我無法讓我的程序使用以下代碼構建。我嘗試了其他縮進,沒有任何改變。
參考: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中是多餘的:「...」'。 –
啊,是的,我在測試併發布這個問題之前補充說。但是,您提到我的語法錯誤,導致我遇到了另一個問題。謝謝,我會在幾分鐘後發佈我的新問題。 – Brien