How to run Xunit test in F #

I have Xunit and Xunit (Runner: Visual Studio) and this is my simple test:

namespace Testing

    module Tests =
        open Xunit
        open Xunit.Extensions

        [<Fact>]
        let ``just test`` =
                Assert.Equal(1, 1)
                ()

      

But I can find Xunit in Test -> Window -> Test explorer and Resharper Unit Tests Window.

+3


source to share


1 answer


It seems that your test is not the type of device , ()

to identify it as a function with no arguments. If you write your test like this, it should appear in the Visual Studio Test Explorer.



[<Fact>]
let ``just test`` () =
    Assert.Equal(1, 1)

      

+11


source







All Articles