开发者

running fsUnit tests from visual studio

So i wrote my first fsUnit test in Visual studio. It is just an extension to the NUnit framework and I have been using NUnit from doi开发者_如何学Pythonng TDD in C#. While writing tests in c#, I am able to run the tests from visual studio But I am not able to run f# tests from VS. why is this ? Are there any other tools which i can use to run the tests (externally)?


fsUnit is just a library that allows you to write the body of the unit test using combinators, but the rest of the unit test can be written as a usual class (with the usual attributes). If you write something like the following then the NUnit test runner should see it (e.g. in a file Tests.fs in some project):

open FsUnit
open NUnit.Framework

[<TestFixture>]
type AccountTest() =
  [<Test>]
  member x.SimpleTest() = 
    1 |> should equal 1
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜