tracks/fsharp/exercises/minesweeper/MinesweeperTest.fs in trackler-2.2.1.22 vs tracks/fsharp/exercises/minesweeper/MinesweeperTest.fs in trackler-2.2.1.23
- old
+ new
@@ -1,21 +1,21 @@
-module MinesweeperTest
+module MinesweeperTest
-open NUnit.Framework
+open Xunit
+open FsUnit.Xunit
open Minesweeper
let concat = List.reduce (fun x y -> x + "\n" + y)
-[<Test>]
+[<Fact>]
let ``Zero size board`` () =
let actual = ""
let expected = ""
- Assert.That(annotate actual, Is.EqualTo(expected))
+ annotate actual |> should equal expected
-[<Test>]
-[<Ignore("Remove to run test")>]
+[<Fact(Skip = "Remove to run test")>]
let ``Empty board`` () =
let actual =
[" ";
" ";
" "]
@@ -25,14 +25,13 @@
[" ";
" ";
" "]
|> concat
- Assert.That(annotate actual, Is.EqualTo(expected))
+ annotate actual |> should equal expected
-[<Test>]
-[<Ignore("Remove to run test")>]
+[<Fact(Skip = "Remove to run test")>]
let ``Board full of mines`` () =
let actual =
["***";
"***";
"***"]
@@ -42,14 +41,13 @@
["***";
"***";
"***"]
|> concat
- Assert.That(annotate actual, Is.EqualTo(expected))
+ annotate actual |> should equal expected
-[<Test>]
-[<Ignore("Remove to run test")>]
+[<Fact(Skip = "Remove to run test")>]
let ``Surrounded`` () =
let actual =
["***";
"* *";
"***"]
@@ -59,22 +57,20 @@
["***";
"*8*";
"***"]
|> concat
- Assert.That(annotate actual, Is.EqualTo(expected))
+ annotate actual |> should equal expected
-[<Test>]
-[<Ignore("Remove to run test")>]
+[<Fact(Skip = "Remove to run test")>]
let ``Horizontal line`` () =
let actual = [" * * "] |> concat
let expected = ["1*2*1"] |> concat
- Assert.That(annotate actual, Is.EqualTo(expected))
+ annotate actual |> should equal expected
-[<Test>]
-[<Ignore("Remove to run test")>]
+[<Fact(Skip = "Remove to run test")>]
let ``Vertical line`` () =
let actual =
[" ";
"*";
" ";
@@ -88,14 +84,13 @@
"2";
"*";
"1"]
|> concat
- Assert.That(annotate actual, Is.EqualTo(expected))
+ annotate actual |> should equal expected
-[<Test>]
-[<Ignore("Remove to run test")>]
+[<Fact(Skip = "Remove to run test")>]
let ``Cross`` () =
let actual =
[" * ";
" * ";
"*****";
@@ -109,7 +104,7 @@
"*****";
"25*52";
" 2*2 "]
|> concat
- Assert.That(annotate actual, Is.EqualTo(expected))
+ annotate actual |> should equal expected