tracks/fsharp/exercises/dot-dsl/DotDslTest.fs in trackler-2.2.1.22 vs tracks/fsharp/exercises/dot-dsl/DotDslTest.fs in trackler-2.2.1.23

- old
+ new

@@ -1,65 +1,61 @@ -module DotDslTest +module DotDslTest -open NUnit.Framework +open Xunit +open FsUnit.Xunit open DotDsl -[<Test>] +[<Fact>] let ``Empty graph`` () = let g = graph [] - Assert.That(nodes g, Is.Empty) - Assert.That(edges g, Is.Empty) - Assert.That(attrs g, Is.Empty) + nodes g |> should be Empty + edges g |> should be Empty + attrs g |> should be Empty -[<Test>] -[<Ignore("Remove to run test")>] +[<Fact(Skip = "Remove to run test")>] let ``Graph with one node`` () = let g = graph [ node "a" [] ] - Assert.That(nodes g, Is.EqualTo([node "a" []])) - Assert.That(edges g, Is.Empty) - Assert.That(attrs g, Is.Empty) + nodes g |> should equal [node "a" []] + edges g |> should be Empty + attrs g |> should be Empty -[<Test>] -[<Ignore("Remove to run test")>] +[<Fact(Skip = "Remove to run test")>] let ``Graph with one node with keywords`` () = let g = graph [ node "a" [("color", "green")] ] - Assert.That(nodes g, Is.EqualTo([node "a" [("color", "green")]])) - Assert.That(edges g, Is.Empty) - Assert.That(attrs g, Is.Empty) + nodes g |> should equal [node "a" [("color", "green")]] + edges g |> should be Empty + attrs g |> should be Empty -[<Test>] -[<Ignore("Remove to run test")>] +[<Fact(Skip = "Remove to run test")>] let ``Graph with one edge`` () = let g = graph [ edge "a" "b" [] ] - Assert.That(nodes g, Is.Empty) - Assert.That(edges g, Is.EqualTo([edge "a" "b" []])) - Assert.That(attrs g, Is.Empty) + nodes g |> should be Empty + edges g |> should equal [edge "a" "b" []] + attrs g |> should be Empty -[<Test>] -[<Ignore("Remove to run test")>] +[<Fact(Skip = "Remove to run test")>] let ``Graph with one attribute`` () = let g = graph [ attr "foo" "1" ] - Assert.That(nodes g, Is.Empty) - Assert.That(edges g, Is.Empty) - Assert.That(attrs g, Is.EqualTo([attr "foo" "1"])) + nodes g |> should be Empty + edges g |> should be Empty + attrs g |> should equal [attr "foo" "1"] -[<Test>] -[<Ignore("Remove to run test")>] +[<Fact(Skip = "Remove to run test")>] let ``Graph with attributes`` () = let g = graph [ attr "foo" "1" attr "title" "Testing Attrs" node "a" [("color", "green")] @@ -68,8 +64,8 @@ edge "b" "c" [] edge "a" "b" [("color", "blue")] attr "bar" "true" ] - Assert.That(nodes g, Is.EqualTo([node "a" [("color", "green")]; node "b" [("label", "Beta!")]; node "c" []])) - Assert.That(edges g, Is.EqualTo([edge "a" "b" [("color", "blue")]; edge "b" "c" []])) - Assert.That(attrs g, Is.EqualTo([attr "bar" "true"; attr "foo" "1"; attr "title" "Testing Attrs"])) + nodes g |> should equal [node "a" [("color", "green")]; node "b" [("label", "Beta!")]; node "c" []] + edges g |> should equal [edge "a" "b" [("color", "blue")]; edge "b" "c" []] + attrs g |> should equal [attr "bar" "true"; attr "foo" "1"; attr "title" "Testing Attrs"] \ No newline at end of file