Using F# for testing
https://swlaschin.gitbooks.io/fsharpforfunandprofit/content/posts/low-risk-ways-to-use-fsharp-at-work-3.html
10. 使用 F# 编写具有可读名称的单元测试
[<TestFixture>]
type TestClass() =
[<Test>]
member this.When2IsAddedTo2Expect4() =
Assert.AreEqual(4, 2+2)[<Test>]
let ``When 2 is added to 2 expect 4``() =
Assert.AreEqual(4, 2+2)11. 使用 F# 以编程方式运行单元测试
Using the NUnit test runner
12. Use F# to learn to write unit tests in other ways
13. Use FsCheck to write better unit tests(该库最后一次更新在Nov 7, 2022,不翻译该部分)
14. Use FsCheck to create random dummy data(该库最后一次更新在Nov 7, 2022,不翻译该部分)
15. Use F# to create mocks
16. Use F# to do automated browser testing(TODO:未来再翻,这段好无聊)
17. Use F# for Behaviour Driven Development(TODO:未来再翻,这段也好无聊,说实话我在现在的网上就没见过讨论BDD的,能给点案例么)
Summary of testing in F#
Last updated