Skip to content

Commit

Permalink
Negative test
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveGilham committed Jan 8, 2024
1 parent 6b50fb7 commit ea7a12d
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions altcode.test/validation/NUnit.fs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,23 @@ module NUnit =

Assert.That(x1.Message, Is.EqualTo expected)

let match2 =
(Constraint.Create().WithActual true)
.WithConstraint
Is.Not.True

let x2 =
Assert.Throws<AssertionException>(fun _ -> AltAssert.That(match2, "some text"))

let expected2 =
" some text\n"
+ """Assert.That(, )
Expected: not True
But was: True
"""

Assert.That(x2.Message, Is.EqualTo expected2)

[<Test>]
let AreEqualShouldPass () =
let match1 = { Actual = 5; Expected = 5 }
Expand Down

0 comments on commit ea7a12d

Please sign in to comment.