Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
### 6.0.0.0-alpha1 - Dec 12, 2023
- Migrate to NUnit 4.
### 6.0.0.0-alpha2 - Dec 15, 2023
- Migrate to NUnit v4.
- [BREAKING] FsUnit (NUnit v4 as dependency) drops netstandard2.0 as target framework.
- Update dependencies to MsTest v3.

### 5.6.1.0 - Nov 29, 2023
- Set NUnit dependency < 4.0.0 to prevent compatibility issues. - (https://github.com/fsprojects/FsUnit/pull/257)
Expand Down
4 changes: 2 additions & 2 deletions paket.dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ nuget xunit ~> 2.5.3
nuget xunit.runner.visualstudio

// MsTest
nuget MSTest.TestFramework
nuget MSTest.TestAdapter ~> 2.1.2
nuget MSTest.TestFramework ~> 3.0.4
nuget MSTest.TestAdapter ~> 3.0.4
32 changes: 3 additions & 29 deletions paket.lock
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,16 @@ NUGET
Microsoft.TestPlatform.TestHost (17.8) - restriction: || (== net6.0) (&& (== netstandard2.0) (>= netcoreapp3.1))
Microsoft.TestPlatform.ObjectModel (>= 17.8) - restriction: || (== net6.0) (&& (== netstandard2.0) (>= netcoreapp3.1))
Newtonsoft.Json (>= 13.0.1) - restriction: || (== net6.0) (&& (== netstandard2.0) (>= netcoreapp3.1))
MSTest.TestAdapter (2.1.2)
NETStandard.Library (>= 1.6.1) - restriction: || (== net6.0) (&& (== netstandard2.0) (>= netcoreapp1.0))
System.Diagnostics.TextWriterTraceListener (>= 4.3) - restriction: || (== net6.0) (&& (== netstandard2.0) (>= netcoreapp1.0))
MSTest.TestFramework (3.1.1)
MSTest.TestAdapter (3.0.4)
MSTest.TestFramework (3.0.4)
NETStandard.Library (2.0.3)
Microsoft.NETCore.Platforms (>= 1.1)
Newtonsoft.Json (13.0.3) - restriction: || (== net6.0) (&& (== netstandard2.0) (>= netcoreapp3.1))
NHamcrest (3.4)
NuGet.Frameworks (6.8) - restriction: || (== net6.0) (&& (== netstandard2.0) (>= netcoreapp3.1))
NUnit (4.0.1)
NUnit3TestAdapter (4.5)
runtime.native.System (4.3.1) - restriction: || (== net6.0) (&& (== netstandard2.0) (>= netcoreapp1.0))
Microsoft.NETCore.Platforms (>= 1.1.1)
Microsoft.NETCore.Targets (>= 1.1.3)
System.Buffers (4.5.1) - restriction: || (&& (== net6.0) (>= net462)) (== netstandard2.0)
System.Collections (4.3) - restriction: || (== net6.0) (&& (== netstandard2.0) (>= netcoreapp1.0))
Microsoft.NETCore.Platforms (>= 1.1)
Microsoft.NETCore.Targets (>= 1.1)
System.Runtime (>= 4.3)
System.Collections.Immutable (8.0)
System.Memory (>= 4.5.5) - restriction: || (&& (== net6.0) (>= net462)) (== netstandard2.0)
System.Runtime.CompilerServices.Unsafe (>= 6.0)
Expand All @@ -47,23 +38,6 @@ NUGET
Microsoft.NETCore.Platforms (>= 1.1)
Microsoft.NETCore.Targets (>= 1.1)
System.Runtime (>= 4.3)
System.Diagnostics.TextWriterTraceListener (4.3) - restriction: || (== net6.0) (&& (== netstandard2.0) (>= netcoreapp1.0))
System.Diagnostics.TraceSource (>= 4.3)
System.Globalization (>= 4.3)
System.IO (>= 4.3)
System.Resources.ResourceManager (>= 4.3)
System.Runtime (>= 4.3)
System.Threading (>= 4.3)
System.Diagnostics.TraceSource (4.3) - restriction: || (== net6.0) (&& (== netstandard2.0) (>= netcoreapp1.0))
Microsoft.NETCore.Platforms (>= 1.1)
runtime.native.System (>= 4.3)
System.Collections (>= 4.3)
System.Diagnostics.Debug (>= 4.3)
System.Globalization (>= 4.3)
System.Resources.ResourceManager (>= 4.3)
System.Runtime (>= 4.3)
System.Runtime.Extensions (>= 4.3)
System.Threading (>= 4.3)
System.Globalization (4.3)
Microsoft.NETCore.Platforms (>= 1.1)
Microsoft.NETCore.Targets (>= 1.1)
Expand Down Expand Up @@ -105,7 +79,7 @@ NUGET
Microsoft.NETCore.Platforms (>= 1.1.1)
Microsoft.NETCore.Targets (>= 1.1.3)
System.Runtime (>= 4.3.1)
System.Text.Encoding (4.3) - restriction: || (== net6.0) (&& (== netstandard2.0) (>= netcoreapp1.0))
System.Text.Encoding (4.3)
Microsoft.NETCore.Platforms (>= 1.1)
Microsoft.NETCore.Targets (>= 1.1)
System.Runtime (>= 4.3)
Expand Down
2 changes: 1 addition & 1 deletion src/FsUnit.MsTestUnit/FsUnit.MsTest.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
</PropertyGroup>
<PropertyGroup Condition="($(DesignTimeBuild) == true)">
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
<DisableImplicitFrameworkReferences>false</DisableImplicitFrameworkReferences>
</PropertyGroup>
<ItemGroup>
<Compile Include="AssemblyInfo.fs" />
Expand Down
2 changes: 1 addition & 1 deletion src/FsUnit.NUnit/paket.template
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ files
../../src/install.ps1 ==> tools

dependencies
NUnit >= LOCKEDVERSION < 4.0.0
NUnit >= LOCKEDVERSION
FSharp.Core >= LOCKEDVERSION
12 changes: 6 additions & 6 deletions tests/FsUnit.MsTest.Test/FsUnit.MsTest.Test.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
<ItemGroup>
<Compile Include="ofCase.fs" />
<Compile Include="ofCaseTests.fs" />
<Compile Include="beAscendingTests.fs" />
<Compile Include="beChoice.fs" />
<Compile Include="beChoiceTests.fs" />
<Compile Include="beDescendingTests.fs" />
<Compile Include="beEmptyStringTests.fs" />
<Compile Include="beEmptyTests.fs" />
<Compile Include="beFalseTests.fs" />
<Compile Include="beGreaterThanOrEqualTo.fs" />
<Compile Include="beGreaterThanOrEqualToTests.fs" />
<Compile Include="beGreaterThanTests.fs" />
<Compile Include="beInRangeTests.fs" />
<Compile Include="beLessThanOrEqualToTests.fs" />
Expand All @@ -33,9 +33,9 @@
<Compile Include="matchListTests.fs" />
<Compile Include="raiseTests.fs" />
<Compile Include="shouldFailTests.fs" />
<Compile Include="shouldEndWithTests.fs" />
<Compile Include="shouldStartWithTests.fs" />
<Compile Include="shouldHaveSubstringTests.fs" />
<Compile Include="endWithTests.fs" />
<Compile Include="startWithTests.fs" />
<Compile Include="haveSubstringTests.fs" />
<Compile Include="instanceOfTests.fs" />
<Compile Include="NaNTests.fs" />
<Compile Include="beUniqueTests.fs" />
Expand Down
7 changes: 4 additions & 3 deletions tests/FsUnit.MsTest.Test/NaNTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ open FsUnit.MsTest
open System

[<TestClass>]
type ``Not a Number tests``() =
type ``NotANumberTests``() =

[<TestMethod>]
member _.``Number 1 should be a number``() =
1 |> should not' (be NaN)
Expand All @@ -15,9 +16,9 @@ type ``Not a Number tests``() =
Double.NaN |> should be NaN

[<TestMethod>]
member _.``float number 2[dot]0 should be a number``() =
member _.``float number 2.0 should be a number``() =
2.0 |> should not' (be NaN)

[<TestMethod>]
member _.``float number 2[dot]0 should fail to not be a number``() =
member _.``float number 2.0 should fail to not be a number``() =
shouldFail(fun () -> 2.0 |> should be NaN)
3 changes: 2 additions & 1 deletion tests/FsUnit.MsTest.Test/beAscendingTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ open Microsoft.VisualStudio.TestTools.UnitTesting
open FsUnit.MsTest

[<TestClass>]
type ``be ascending tests``() =
type ``beAscendingTests``() =

[<TestMethod>]
member _.``Empty list should be ascending``() =
[] |> should be ascending
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ open Microsoft.VisualStudio.TestTools.UnitTesting
open FsUnit.MsTest

[<TestClass>]
type ``be choice tests``() =
type ``beChoiceTests``() =

[<TestMethod>]
member _.``Choice1Of2 should be the first choice``() =
Choice<int, int>.Choice1Of2(1) |> should be (choice 1)
Expand Down
3 changes: 2 additions & 1 deletion tests/FsUnit.MsTest.Test/beDescendingTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ open Microsoft.VisualStudio.TestTools.UnitTesting
open FsUnit.MsTest

[<TestClass>]
type ``be descending tests``() =
type ``beDescendingTests``() =

[<TestMethod>]
member _.``Empty list should be descending``() =
[] |> should be descending
Expand Down
3 changes: 2 additions & 1 deletion tests/FsUnit.MsTest.Test/beEmptyStringTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ open Microsoft.VisualStudio.TestTools.UnitTesting
open FsUnit.MsTest

[<TestClass>]
type ``be EmptyString tests``() =
type ``beEmptyStringTests``() =

[<TestMethod>]
member _.``empty string should be EmptyString``() =
"" |> should be NullOrEmptyString
Expand Down
3 changes: 2 additions & 1 deletion tests/FsUnit.MsTest.Test/beEmptyTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ open Microsoft.VisualStudio.TestTools.UnitTesting
open FsUnit.MsTest

[<TestClass>]
type ``be Empty tests``() =
type ``beEmptyTests``() =

[<TestMethod>]
member _.``empty List should be Empty``() =
[] |> should be Empty
Expand Down
5 changes: 3 additions & 2 deletions tests/FsUnit.MsTest.Test/beFalseTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ open Microsoft.VisualStudio.TestTools.UnitTesting
open FsUnit.MsTest

[<TestClass>]
type ``be False tests``() =
type ``beFalseTests``() =

[<TestMethod>]
member _.``false should be False``() =
false |> should be False
Expand All @@ -19,4 +20,4 @@ type ``be False tests``() =

[<TestMethod>]
member _.``false should fail to not be False``() =
false |> should be False
shouldFail(fun () -> false |> should not' (be False))
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,26 @@ open Microsoft.VisualStudio.TestTools.UnitTesting
open FsUnit.MsTest

[<TestClass>]
type ``be greaterThanOrEqualTo tests``() =
type ``beGreaterThanOrEqualToTests``() =

[<TestMethod>]
member _.``11 should be greater than 10``() =
11 |> should be (greaterThanOrEqualTo 10)

[<TestMethod>]
member _.``11[dot]1 should be greater than 11[dot]0``() =
member _.``11.1 should be greater than 11.0``() =
11.1 |> should be (greaterThanOrEqualTo 11.0)

[<TestMethod>]
member _.``9 should not be greater than 10``() =
9 |> should not' (be greaterThanOrEqualTo 10)

[<TestMethod>]
member _.``9[dot]1 should not be greater than 9[dot]2``() =
member _.``9.1 should not be greater than 9.2``() =
9.1 |> should not' (be greaterThanOrEqualTo 9.2)

[<TestMethod>]
member _.``9[dot]2 should be equal to 9[dot]2``() =
member _.``9.2 should be equal to 9.2``() =
9.2 |> should be (greaterThanOrEqualTo 9.2)

[<TestMethod>]
Expand Down
10 changes: 5 additions & 5 deletions tests/FsUnit.MsTest.Test/beGreaterThanTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,30 @@ open Microsoft.VisualStudio.TestTools.UnitTesting
open FsUnit.MsTest

[<TestClass>]
type ``be greaterThan tests``() =
type ``beGreaterThanTests``() =

[<TestMethod>]
member _.``11 should be greater than 10``() =
11 |> should be (greaterThan 10)

[<TestMethod>]
member _.``11[dot]1 should be greater than 11[dot]0``() =
member _.``11.1 should be greater than 11.0``() =
11.1 |> should be (greaterThan 11.0)

[<TestMethod>]
member _.``9 should not be greater than 10``() =
9 |> should not' (be greaterThan 10)

[<TestMethod>]
member _.``9[dot]1 should not be greater than 9[dot]2``() =
member _.``9.1 should not be greater than 9.2``() =
9.1 |> should not' (be greaterThan 9.2)

[<TestMethod>]
member _.``9[dot]2 should not be greater than 9[dot]2``() =
member _.``9.2 should not be greater than 9.2``() =
9.2 |> should not' (be greaterThan 9.2)

[<TestMethod>]
member _.``9[dot]2 should not be greater than 9[dot]2 but message should be equal``() =
member _.``9.2 should not be greater than 9.2 but message should be equal``() =
(fun () -> 9.2 |> should be (greaterThan 9.2))
|> fun f -> Assert.ThrowsException<AssertFailedException>(f)
|> fun e -> e.Message
Expand Down
3 changes: 2 additions & 1 deletion tests/FsUnit.MsTest.Test/beInRangeTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ open Microsoft.VisualStudio.TestTools.UnitTesting
open FsUnit.MsTest

[<TestClass>]
type ``be inRange tests``() =
type ``beInRangeTests``() =

[<TestMethod>]
member _.``25 should be in range from 5 to 30``() =
25 |> should be (inRange 5 30)
Expand Down
9 changes: 5 additions & 4 deletions tests/FsUnit.MsTest.Test/beLessThanOrEqualToTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,24 @@ open Microsoft.VisualStudio.TestTools.UnitTesting
open FsUnit.MsTest

[<TestClass>]
type ``be lessThanOrEqualTo tests``() =
type ``beLessThanOrEqualToTests``() =

[<TestMethod>]
member _.``10 should be less than 11``() =
10 |> should be (lessThanOrEqualTo 11)

[<TestMethod>]
member _.``10[dot]0 should be less than 10[dot]1``() =
member _.``10.0 should be less than 10.1``() =
10.0 |> should be (lessThanOrEqualTo 10.1)

[<TestMethod>]
member _.``10 should not be less than 9``() =
10 |> should not' (be lessThanOrEqualTo 9)

[<TestMethod>]
member _.``9[dot]2 should not be less than 9[dot]1``() =
member _.``9.2 should not be less than 9.1``() =
9.2 |> should not' (be lessThanOrEqualTo 9.1)

[<TestMethod>]
member _.``9[dot]1 should be less than or equal to 9[dot]1``() =
member _.``9.1 should be less than or equal to 9.1``() =
9.1 |> should be (lessThanOrEqualTo 9.1)
9 changes: 5 additions & 4 deletions tests/FsUnit.MsTest.Test/beLessThanTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,24 @@ open Microsoft.VisualStudio.TestTools.UnitTesting
open FsUnit.MsTest

[<TestClass>]
type ``be lessThan tests``() =
type ``beLessThanTests``() =

[<TestMethod>]
member _.``10 should be less than 11``() =
10 |> should be (lessThan 11)

[<TestMethod>]
member _.``10[dot]0 should be less than 10[dot]1``() =
member _.``10.0 should be less than 10.1``() =
10.0 |> should be (lessThan 10.1)

[<TestMethod>]
member _.``10 should not be less than 9``() =
10 |> should not' (be lessThan 9)

[<TestMethod>]
member _.``9[dot]2 should not be less than 9[dot]1``() =
member _.``9.2 should not be less than 9.1``() =
9.2 |> should not' (be lessThan 9.1)

[<TestMethod>]
member _.``9[dot]1 should not be less than 9[dot]1``() =
member _.``9.1 should not be less than 9.1``() =
9.1 |> should not' (be lessThan 9.1)
3 changes: 2 additions & 1 deletion tests/FsUnit.MsTest.Test/beNullOrEmptyStringTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ open Microsoft.VisualStudio.TestTools.UnitTesting
open FsUnit.MsTest

[<TestClass>]
type ``be NullOrEmptyString tests``() =
type ``beNullOrEmptyStringTests``() =

[<TestMethod>]
member _.``empty string should be NullOrEmptyString``() =
"" |> should be NullOrEmptyString
Expand Down
3 changes: 2 additions & 1 deletion tests/FsUnit.MsTest.Test/beNullTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ open Microsoft.VisualStudio.TestTools.UnitTesting
open FsUnit.MsTest

[<TestClass>]
type ``be Null tests``() =
type ``beNullTests``() =

[<TestMethod>]
member _.``null should be Null``() =
null |> should be Null
Expand Down
5 changes: 3 additions & 2 deletions tests/FsUnit.MsTest.Test/beOfExactTypeTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ open Microsoft.VisualStudio.TestTools.UnitTesting
open FsUnit.MsTest

[<TestClass>]
type ``should be of exact type tests``() =
type ``beOfExactTypeTests``() =

[<TestMethod>]
member _.``empty string should be of exact type String``() =
"" |> should be ofExactType<string>

[<TestMethod>]
member _.``0[dot]0 should be of exact type float``() =
member _.``0.0 should be of exact type float``() =
0.0 |> should be ofExactType<float>

[<TestMethod>]
Expand Down
3 changes: 2 additions & 1 deletion tests/FsUnit.MsTest.Test/beSameAsTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ open Microsoft.VisualStudio.TestTools.UnitTesting
open FsUnit.MsTest

[<TestClass>]
type ``be SameAs tests``() =
type ``beSameAsTests``() =

let anObj = obj()
let otherObj = obj()

Expand Down
Loading