开发者

running fsUnit tests from visual studio

开发者 https://www.devze.com 2023-01-22 02:46 出处:网络
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 ab

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

精彩评论

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