Skip to content

Commit

Permalink
Fix space alignment.
Browse files Browse the repository at this point in the history
  • Loading branch information
CaptnCodr committed Jun 22, 2020
1 parent 64b5d79 commit 7f82cbe
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 21 deletions.
8 changes: 4 additions & 4 deletions tests/FsUnit.MsTest.Test/beSubsetOfTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ type ``be subsetOf tests`` ()=

[<TestMethod>] member test.
``11 should not be subset of 1 to 10 but message should be equal`` ()=
try
[11] |> should be (subsetOf [1..10])
with
| ex -> ex.Message |> should equal "Is subset of [1; 2; 3; 4; 5; 6; 7; 8; 9; 10] was [11]"
(fun () -> [11] |> should be (subsetOf [1..10]))
|> fun f -> Assert.ThrowsException<AssertFailedException>(f)
|> fun e -> e.Message
|> should equal ("Is subset of [1; 2; 3; 4; 5; 6; 7; 8; 9; 10] was [11]")
8 changes: 4 additions & 4 deletions tests/FsUnit.MsTest.Test/haveLengthTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ type ``haveLength tests`` ()=

[<TestMethod>] member test.
``Array with 1 item should fail to have Length 2 but message should be equal`` ()=
(fun () -> [|1|] |> should haveLength 2)
|> fun f -> Assert.ThrowsException<AssertFailedException>(f)
|> fun e -> e.Message
|> should equal ("Have Length 2 was [|1|]")
(fun () -> [|1|] |> should haveLength 2)
|> fun f -> Assert.ThrowsException<AssertFailedException>(f)
|> fun e -> e.Message
|> should equal ("Have Length 2 was [|1|]")

// Seq
[<TestMethod>] member test.
Expand Down
9 changes: 4 additions & 5 deletions tests/FsUnit.MsTest.Test/shouldStartWithTests.fs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
namespace FsUnit.Test
open Microsoft.VisualStudio.TestTools.UnitTesting
open FsUnit.MsTest
open NHamcrest.Core

[<TestClass>]
type ``should startWith tests`` ()=
Expand All @@ -19,8 +18,8 @@ type ``should startWith tests`` ()=

[<TestMethod>] member test.
``ships should not start with ss but message should be equal`` ()=
(fun () -> "ships" |> should startWith "ss")
|> fun f -> Assert.ThrowsException<AssertFailedException>(f)
|> fun e -> e.Message
|> should equal ("ss was \"ships\"")
(fun () -> "ships" |> should startWith "ss")
|> fun f -> Assert.ThrowsException<AssertFailedException>(f)
|> fun e -> e.Message
|> should equal ("ss was \"ships\"")

8 changes: 4 additions & 4 deletions tests/FsUnit.Xunit.Test/equalTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ type ``equal Tests`` ()=

[<Fact>] member test.
``Ok "foo" should fail on equal Ok "bar" but message should be equal`` ()=
(fun () -> Ok "foo" |> should equal (Ok "bar"))
|> fun f -> Assert.Throws<MatchException>(f)
|> fun e -> (e.Expected, e.Actual)
|> should equal ("Equals Ok \"bar\"", "Ok \"foo\"")
(fun () -> Ok "foo" |> should equal (Ok "bar"))
|> fun f -> Assert.Throws<MatchException>(f)
|> fun e -> (e.Expected, e.Actual)
|> should equal ("Equals Ok \"bar\"", "Ok \"foo\"")
8 changes: 4 additions & 4 deletions tests/FsUnit.Xunit.Test/shouldStartWithTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ type ``should startWith tests`` ()=

[<Fact>] member test.
``ships should not start with ss but messages should equal`` ()=
(fun _ -> "ships" |> should startWith "ss")
|> fun f -> Assert.Throws<MatchException>(f)
|> fun e -> (e.Expected, e.Actual)
|> should equal ("ss", "\"ships\"")
(fun _ -> "ships" |> should startWith "ss")
|> fun f -> Assert.Throws<MatchException>(f)
|> fun e -> (e.Expected, e.Actual)
|> should equal ("ss", "\"ships\"")

0 comments on commit 7f82cbe

Please sign in to comment.