-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #144 from CaptnCodr/feature/subsetOf
Add collection subsetOf assertion for NUnit, xUnit and MsTest.
- Loading branch information
Showing
15 changed files
with
144 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
namespace FsUnit.Test | ||
open Microsoft.VisualStudio.TestTools.UnitTesting | ||
open FsUnit.MsTest | ||
|
||
[<TestClass>] | ||
type ``be subsetOf tests`` ()= | ||
|
||
[<TestMethod>] member test. | ||
``5, 3 and 8 should be subset of 1 to 10`` ()= | ||
[5;3;8] |> should be (subsetOf [1..10]) | ||
|
||
[<TestMethod>] member test. | ||
``5 should be subset of 1 to 10`` ()= | ||
[5] |> should be (subsetOf [1..10]) | ||
|
||
[<TestMethod>] member test. | ||
``4 to 8 should be subset of 1 to 10`` ()= | ||
{4..8} |> should be (subsetOf {1..10}) | ||
|
||
[<TestMethod>] member test. | ||
``1 to 10 should be subset of 4. 1 and 7`` ()= | ||
[|1..10|] |> should be (supersetOf [|4;1;7|]) | ||
|
||
[<TestMethod>] member test. | ||
``5, 1 and 11 should not be subset of 1 to 10`` ()= | ||
[5;1;11] |> should not' (be subsetOf [|1..10|]) | ||
|
||
[<TestMethod>] member test. | ||
``1 to 10 should not be subset of 5`` ()= | ||
[1..10] |> should not' (be subsetOf [5]) | ||
|
||
[<TestMethod>] member test. | ||
``1 to 10 should be subset of 1 to 10`` ()= | ||
[1..10] |> should be (subsetOf [1..10]) | ||
|
||
[<TestMethod>] member test. | ||
``should fail on '1 to 11 should be subset of 1 to 10'`` ()= | ||
shouldFail (fun () -> | ||
[1..11] |> should be (subsetOf [1..10])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
namespace FsUnit.Test | ||
open NUnit.Framework | ||
open FsUnit | ||
|
||
[<TestFixture>] | ||
type ``be subsetOf tests`` ()= | ||
|
||
[<Test>] member test. | ||
``5, 3 and 8 should be subset of 1 to 10`` ()= | ||
[5;3;8] |> should be (subsetOf [1..10]) | ||
|
||
[<Test>] member test. | ||
``5 should be subset of 1 to 10`` ()= | ||
[5] |> should be (subsetOf [1..10]) | ||
|
||
[<Test>] member test. | ||
``4 to 8 should be subset of 1 to 10`` ()= | ||
{4..8} |> should be (subsetOf {1..10}) | ||
|
||
[<Test>] member test. | ||
``1 to 10 should be subset of 4. 1 and 7`` ()= | ||
[|1..10|] |> should be (supersetOf [|4;1;7|]) | ||
|
||
[<Test>] member test. | ||
``5, 1 and 11 should not be subset of 1 to 10`` ()= | ||
[5;1;11] |> should not' (be subsetOf [|1..10|]) | ||
|
||
[<Test>] member test. | ||
``1 to 10 should not be subset of 5`` ()= | ||
[1..10] |> should not' (be subsetOf [5]) | ||
|
||
[<Test>] member test. | ||
``1 to 10 should be subset of 1 to 10`` ()= | ||
[1..10] |> should be (subsetOf [1..10]) | ||
|
||
[<Test>] member test. | ||
``should fail on '1 to 11 should be subset of 1 to 10'`` ()= | ||
shouldFail (fun () -> | ||
[1..11] |> should be (subsetOf [1..10])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
namespace FsUnit.Test | ||
open Xunit | ||
open FsUnit.Xunit | ||
|
||
type ``be subsetOf tests`` ()= | ||
|
||
[<Fact>] member test. | ||
``5, 3 and 8 should be subset of 1 to 10`` ()= | ||
[5;3;8] |> should be (subsetOf [1..10]) | ||
|
||
[<Fact>] member test. | ||
``5 should be subset of 1 to 10`` ()= | ||
[5] |> should be (subsetOf [1..10]) | ||
|
||
[<Fact>] member test. | ||
``4 to 8 should be subset of 1 to 10`` ()= | ||
{4..8} |> should be (subsetOf {1..10}) | ||
|
||
[<Fact>] member test. | ||
``1 to 10 should be subset of 4. 1 and 7`` ()= | ||
[|1..10|] |> should be (supersetOf [|4;1;7|]) | ||
|
||
[<Fact>] member test. | ||
``5, 1 and 11 should not be subset of 1 to 10`` ()= | ||
[5;1;11] |> should not' (be subsetOf [|1..10|]) | ||
|
||
[<Fact>] member test. | ||
``1 to 10 should not be subset of 5`` ()= | ||
[1..10] |> should not' (be subsetOf [5]) | ||
|
||
[<Fact>] member test. | ||
``1 to 10 should be subset of 1 to 10`` ()= | ||
[1..10] |> should be (subsetOf [1..10]) | ||
|
||
[<Fact>] member test. | ||
``should fail on '1 to 11 should be subset of 1 to 10'`` ()= | ||
shouldFail (fun () -> | ||
[1..11] |> should be (subsetOf [1..10])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters