I am trying to assert that an exception was thrown. Here is a cut down piece of code that reproduces the problem:
open FsUnit
open Xunit
let testException () =
raise <| Exception()
[<Fact>]
let ``should assert throw correctly``() =
(testException ())
|> should throw typeof<System.Exception>
The error says that a System.Exception was thrown but the test should pass as that is what I am asserting. Can someone please help with where I am going wrong.