` tag matching the latest entry in `RELEASE_NOTES.md` to build and publish all six NuGet packages.
+- Configure a NuGet.org Trusted Publisher for `fsprojects/FsUnit` and `.github/workflows/publish.yml`; add the NuGet account username (not email) as the `NUGET_USER` GitHub secret.
## Maintainer(s)
diff --git a/build.cmd b/build.cmd
index 07af35cd..ca2e1d78 100644
--- a/build.cmd
+++ b/build.cmd
@@ -2,5 +2,4 @@
cls
dotnet tool restore
-dotnet paket restore
dotnet run --project build/build.fsproj -- %*
diff --git a/build.sh b/build.sh
index 15694036..a942e852 100755
--- a/build.sh
+++ b/build.sh
@@ -1,5 +1,4 @@
#!/bin/bash
dotnet tool restore
-dotnet paket restore
dotnet run --project build/build.fsproj -- "$@"
diff --git a/build/build.fs b/build/build.fs
index 50eb2e7b..ceb87ffd 100644
--- a/build/build.fs
+++ b/build/build.fs
@@ -81,13 +81,6 @@ Target.create "AssemblyInfo" (fun _ ->
| Csproj -> AssemblyInfoFile.createCSharp ((folderName @@ "Properties") @@ "AssemblyInfo.cs") attributes
| Vbproj -> AssemblyInfoFile.createVisualBasic ((folderName @@ "My Project") @@ "AssemblyInfo.vb") attributes))
-// Copies binaries from default VS location to expected bin folder
-// But keeps a subdirectory structure for each project in the
-// src folder to support multiple project outputs
-Target.create "CopyBinaries" (fun _ ->
- !! "src/**/*.??proj"
- |> Seq.map (fun f -> ((Path.GetDirectoryName f) @@ "bin/Release", "bin" @@ (Path.GetFileNameWithoutExtension f)))
- |> Seq.iter (fun (fromDir, toDir) -> Shell.copyDir toDir fromDir (fun _ -> true)))
// --------------------------------------------------------------------------------------
// Clean build results
@@ -172,21 +165,23 @@ Target.create "MsTest" (fun _ ->
Target.create "RunTests" ignore
// --------------------------------------------------------------------------------------
-// Build a NuGet package
+// Build NuGet packages with the .NET SDK
Target.create "NuGet" (fun _ ->
- Paket.pack (fun p ->
- { p with
- ToolType = ToolType.CreateLocalTool()
- OutputPath = "bin"
- Version = version
- ReleaseNotes = String.toLines release.Notes }))
+ // MSBuild splits -p: values on ',' and ';'; environment variables are read as properties verbatim.
+ Environment.setEnvironVar "PackageReleaseNotes" (String.toLines release.Notes)
+
+ let pack projectPath extraProperties =
+ let result =
+ DotNet.exec id "pack" $"%s{projectPath} -c Release -o bin -p:Version=%s{version} %s{extraProperties}"
+
+ if not result.OK then
+ failwithf "Package build failed for %s: %A" projectPath result.Errors
+ [ "src/FsUnit.NUnit/FsUnit.NUnit.fsproj"
+ "src/FsUnit.Xunit/FsUnit.Xunit.fsproj"
+ "src/FsUnit.MsTestUnit/FsUnit.MsTest.fsproj" ]
+ |> List.iter (fun projectPath -> pack projectPath ""))
-Target.create "PublishNuget" (fun _ ->
- Paket.push (fun p ->
- { p with
- ToolType = ToolType.CreateLocalTool()
- WorkingDir = "bin" }))
// --------------------------------------------------------------------------------------
@@ -221,7 +216,6 @@ Target.create "Release" ignore
==> "AssemblyInfo"
==> "CheckFormat"
==> "Build"
- ==> "CopyBinaries"
==> "RunTests"
==> "All"
@@ -231,6 +225,7 @@ Target.create "Release" ignore
==> "MsTest"
==> "RunTests"
+
"All"
==> "NuGet"
==> "GenerateDocs"
diff --git a/build/build.fsproj b/build/build.fsproj
index a16b7974..d4505641 100644
--- a/build/build.fsproj
+++ b/build/build.fsproj
@@ -14,7 +14,6 @@
-
diff --git a/docs/FsUnitTyped.fsx b/docs/FsUnitTyped.fsx
index 910b728d..b697b501 100644
--- a/docs/FsUnitTyped.fsx
+++ b/docs/FsUnitTyped.fsx
@@ -1,8 +1,8 @@
(*** hide ***)
// This block of code is omitted in the generated HTML documentation. Use
// it to define helpers that you do not want to show in the documentation.
-#r "../packages/NUnit/lib/net8.0/nunit.framework.dll"
-#r "../bin/FsUnit.NUnit/net8.0/FsUnit.NUnit.dll"
+#r "../tests/FsUnit.NUnit.Test/bin/Release/net8.0/nunit.framework.dll"
+#r "../tests/FsUnit.NUnit.Test/bin/Release/net8.0/FsUnit.NUnit.dll"
(**
What is FsUnitTyped?
diff --git a/docs/MsTest.fsx b/docs/MsTest.fsx
index b791d883..654176bf 100644
--- a/docs/MsTest.fsx
+++ b/docs/MsTest.fsx
@@ -1,9 +1,9 @@
(*** hide ***)
// This block of code is omitted in the generated HTML documentation. Use
// it to define helpers that you do not want to show in the documentation.
-#r "../packages/MSTest.TestFramework/lib/netstandard2.0/Microsoft.VisualStudio.TestPlatform.TestFramework.dll"
-#r "../packages/NHamcrest/lib/netstandard2.0/NHamcrest.dll"
-#r "../bin/FsUnit.MsTest/netstandard2.0/FsUnit.MsTest.dll"
+#r "../tests/FsUnit.MsTest.Test/bin/Release/net8.0/MSTest.TestFramework.dll"
+#r "../tests/FsUnit.MsTest.Test/bin/Release/net8.0/NHamcrest.dll"
+#r "../tests/FsUnit.MsTest.Test/bin/Release/net8.0/FsUnit.MsTest.dll"
(**
FsUnit for MsTest
@@ -15,8 +15,6 @@ FsUnit for MsTest
The FsUnit library for MsTest can be
installed from NuGet :
PM> Install-Package Fs30Unit.MsTest
- Sample FsUnit tests for MsTest can be
installed from NuGet :
-
PM> Install-Package Fs30Unit.MsTest.Sample
diff --git a/docs/NUnit.fsx b/docs/NUnit.fsx
index f6bb9be3..152a77d8 100644
--- a/docs/NUnit.fsx
+++ b/docs/NUnit.fsx
@@ -1,8 +1,8 @@
(*** hide ***)
// This block of code is omitted in the generated HTML documentation. Use
// it to define helpers that you do not want to show in the documentation.
-#r "../packages/NUnit/lib/net8.0/nunit.framework.dll"
-#r "../bin/FsUnit.NUnit/net8.0/FsUnit.NUnit.dll"
+#r "../tests/FsUnit.NUnit.Test/bin/Release/net8.0/nunit.framework.dll"
+#r "../tests/FsUnit.NUnit.Test/bin/Release/net8.0/FsUnit.NUnit.dll"
open NUnit.Framework
(**
@@ -15,8 +15,6 @@ FsUnit for NUnit
diff --git a/docs/index.fsx b/docs/index.fsx
index 753f4442..81173ff7 100644
--- a/docs/index.fsx
+++ b/docs/index.fsx
@@ -1,8 +1,8 @@
(*** hide ***)
// This block of code is omitted in the generated HTML documentation. Use
// it to define helpers that you do not want to show in the documentation.
-#r "../packages/NUnit/lib/net8.0/nunit.framework.dll"
-#r "../bin/FsUnit.NUnit/net8.0/FsUnit.NUnit.dll"
+#r "../tests/FsUnit.NUnit.Test/bin/Release/net8.0/nunit.framework.dll"
+#r "../tests/FsUnit.NUnit.Test/bin/Release/net8.0/FsUnit.NUnit.dll"
open FsUnit
@@ -161,12 +161,12 @@ Supplying an expression that will result in a non-union type as well as supplyin
*)
type TestUnion = First | Second of int | Third of string
-First |> should be (ofCase<@ First @>)
-First |> should be (ofCase<@ First, Second @>) // checks if on the cases matches the given case
-Second 5 |> should be (ofCase<@ Second 10 @>) // note, the actual value is not checked!
-First |> should not' (be ofCase<@ Second 5 @>)
-5 |> should be (ofCase<@ Second 5 @>) // will throw an exception
-Second 5 |> should be (ofCase<@ int @>) // will throw an exception
+First |> should be (ofCase <@ First @>)
+First |> should be (ofCase <@ First, Second @>) // checks if on the cases matches the given case
+Second 5 |> should be (ofCase <@ Second 10 @>) // note, the actual value is not checked!
+First |> should not' (be ofCase <@ Second 5 @>)
+5 |> should be (ofCase <@ Second 5 @>) // will throw an exception
+Second 5 |> should be (ofCase <@ int @>) // will throw an exception
(**
diff --git a/docs/xUnit.fsx b/docs/xUnit.fsx
index 783309fd..75b68cd5 100644
--- a/docs/xUnit.fsx
+++ b/docs/xUnit.fsx
@@ -1,9 +1,11 @@
(*** hide ***)
// This block of code is omitted in the generated HTML documentation. Use
// it to define helpers that you do not want to show in the documentation.
-#r "../packages/xunit.extensibility.core/lib/netstandard1.1/xunit.core.dll"
-#r "../packages/NHamcrest/lib/netstandard2.0/NHamcrest.dll"
-#r "../bin/FsUnit.Xunit/netstandard2.0/FsUnit.Xunit.dll"
+#r "../tests/FsUnit.Xunit.Test/bin/Release/net8.0/xunit.v3.core.dll"
+#r "../tests/FsUnit.Xunit.Test/bin/Release/net8.0/xunit.v3.common.dll"
+#r "../tests/FsUnit.Xunit.Test/bin/Release/net8.0/xunit.v3.assert.dll"
+#r "../tests/FsUnit.Xunit.Test/bin/Release/net8.0/NHamcrest.dll"
+#r "../tests/FsUnit.Xunit.Test/bin/Release/net8.0/FsUnit.Xunit.dll"
(**
FsUnit for xUnit
@@ -15,8 +17,6 @@ FsUnit for xUnit
diff --git a/global.json b/global.json
index ca621bcb..2bd643db 100644
--- a/global.json
+++ b/global.json
@@ -2,5 +2,8 @@
"sdk": {
"version": "10.0.401",
"rollForward": "latestPatch"
+ },
+ "test": {
+ "runner": "Microsoft.Testing.Platform"
}
}
\ No newline at end of file
diff --git a/paket.dependencies b/paket.dependencies
deleted file mode 100644
index a7647eb0..00000000
--- a/paket.dependencies
+++ /dev/null
@@ -1,21 +0,0 @@
-source https://api.nuget.org/v3/index.json
-framework: net8.0, netstandard2.0
-
-nuget FSharp.Core ~> 5.0.0
-
-nuget Microsoft.NET.Test.Sdk
-
-// NUnit
-nuget NUnit ~> 5.0.0
-nuget NUnit3TestAdapter
-nuget System.Collections.Immutable
-nuget System.Collections.NonGeneric
-
-// xUnit
-nuget NHamcrest
-nuget xunit.v3 ~> 1.0.0
-nuget xunit.runner.visualstudio
-
-// MsTest
-nuget MSTest.TestFramework ~> 3.6.0
-nuget MSTest.TestAdapter ~> 3.6.0
diff --git a/paket.lock b/paket.lock
deleted file mode 100644
index ad07dae4..00000000
--- a/paket.lock
+++ /dev/null
@@ -1,132 +0,0 @@
-RESTRICTION: || (== net8.0) (== netstandard2.0)
-NUGET
- remote: https://api.nuget.org/v3/index.json
- FSharp.Core (5.0.2)
- Microsoft.ApplicationInsights (2.22)
- System.Diagnostics.DiagnosticSource (>= 5.0)
- Microsoft.Bcl.AsyncInterfaces (9.0) - restriction: || (== net8.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0))
- Microsoft.CodeCoverage (17.12) - restriction: || (== net8.0) (&& (== netstandard2.0) (>= net462)) (&& (== netstandard2.0) (>= netcoreapp3.1))
- Microsoft.NET.Test.Sdk (17.12)
- Microsoft.CodeCoverage (>= 17.12) - restriction: || (== net8.0) (&& (== netstandard2.0) (>= net462)) (&& (== netstandard2.0) (>= netcoreapp3.1))
- Microsoft.TestPlatform.TestHost (>= 17.12) - restriction: || (== net8.0) (&& (== netstandard2.0) (>= netcoreapp3.1))
- Microsoft.NETCore.Platforms (7.0.4)
- Microsoft.NETCore.Targets (5.0)
- Microsoft.Testing.Extensions.Telemetry (1.4.3)
- Microsoft.ApplicationInsights (>= 2.22)
- Microsoft.Testing.Platform (>= 1.4.3)
- Microsoft.Testing.Extensions.TrxReport.Abstractions (1.4.3)
- Microsoft.Testing.Platform (>= 1.4.3)
- Microsoft.Testing.Extensions.VSTestBridge (1.4.3)
- Microsoft.ApplicationInsights (>= 2.22)
- Microsoft.Testing.Extensions.Telemetry (>= 1.4.3)
- Microsoft.Testing.Extensions.TrxReport.Abstractions (>= 1.4.3)
- Microsoft.Testing.Platform (>= 1.4.3)
- Microsoft.TestPlatform.ObjectModel (>= 17.11.1)
- Microsoft.Testing.Platform (1.4.3)
- Microsoft.Testing.Platform.MSBuild (1.4.3)
- Microsoft.Testing.Platform (>= 1.4.3)
- Microsoft.TestPlatform.ObjectModel (17.12)
- System.Reflection.Metadata (>= 1.6)
- Microsoft.TestPlatform.TestHost (17.12) - restriction: || (== net8.0) (&& (== netstandard2.0) (>= netcoreapp3.1))
- Microsoft.TestPlatform.ObjectModel (>= 17.12) - restriction: || (== net8.0) (&& (== netstandard2.0) (>= netcoreapp3.1))
- Newtonsoft.Json (>= 13.0.1) - restriction: || (== net8.0) (&& (== netstandard2.0) (>= netcoreapp3.1))
- MSTest.TestAdapter (3.6.4)
- Microsoft.Testing.Extensions.VSTestBridge (>= 1.4.3)
- Microsoft.Testing.Platform.MSBuild (>= 1.4.3)
- MSTest.TestFramework (3.6.4)
- Newtonsoft.Json (13.0.3) - restriction: || (== net8.0) (&& (== netstandard2.0) (>= netcoreapp3.1))
- NHamcrest (4.0)
- NUnit (5.0)
- NUnit3TestAdapter (4.6)
- System.Buffers (4.6) - restriction: || (&& (== net8.0) (>= net462)) (== netstandard2.0)
- System.Collections.Immutable (9.0)
- System.Memory (>= 4.5.5) - restriction: || (&& (== net8.0) (>= net462)) (== netstandard2.0)
- System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (&& (== net8.0) (>= net462)) (== netstandard2.0)
- System.Collections.NonGeneric (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.Diagnostics.Debug (4.3)
- Microsoft.NETCore.Platforms (>= 1.1)
- Microsoft.NETCore.Targets (>= 1.1)
- System.Runtime (>= 4.3)
- System.Diagnostics.DiagnosticSource (9.0)
- System.Memory (>= 4.5.5) - restriction: || (&& (== net8.0) (>= net462)) (== netstandard2.0)
- System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (&& (== net8.0) (>= net462)) (== netstandard2.0)
- System.Globalization (4.3)
- Microsoft.NETCore.Platforms (>= 1.1)
- Microsoft.NETCore.Targets (>= 1.1)
- System.Runtime (>= 4.3)
- System.IO (4.3)
- Microsoft.NETCore.Platforms (>= 1.1)
- Microsoft.NETCore.Targets (>= 1.1)
- System.Runtime (>= 4.3)
- System.Text.Encoding (>= 4.3)
- System.Threading.Tasks (>= 4.3)
- System.Memory (4.6) - restriction: || (&& (== net8.0) (>= net462)) (== netstandard2.0)
- System.Buffers (>= 4.6) - restriction: || (&& (== net8.0) (>= net462)) (&& (== net8.0) (< netcoreapp2.1)) (== netstandard2.0)
- System.Numerics.Vectors (>= 4.6) - restriction: || (&& (== net8.0) (>= net462)) (&& (== net8.0) (< netcoreapp2.1)) (== netstandard2.0)
- System.Runtime.CompilerServices.Unsafe (>= 6.1) - restriction: || (&& (== net8.0) (>= net462)) (&& (== net8.0) (< netcoreapp2.1)) (== netstandard2.0)
- System.Numerics.Vectors (4.6) - restriction: || (&& (== net8.0) (>= net462)) (== netstandard2.0)
- System.Reflection (4.3)
- Microsoft.NETCore.Platforms (>= 1.1)
- Microsoft.NETCore.Targets (>= 1.1)
- System.IO (>= 4.3)
- System.Reflection.Primitives (>= 4.3)
- System.Runtime (>= 4.3)
- System.Reflection.Metadata (9.0) - restriction: || (== net8.0) (&& (== netstandard2.0) (>= netcoreapp3.1))
- System.Collections.Immutable (>= 9.0)
- System.Reflection.Primitives (4.3)
- Microsoft.NETCore.Platforms (>= 1.1)
- Microsoft.NETCore.Targets (>= 1.1)
- System.Runtime (>= 4.3)
- System.Resources.ResourceManager (4.3)
- Microsoft.NETCore.Platforms (>= 1.1)
- Microsoft.NETCore.Targets (>= 1.1)
- System.Globalization (>= 4.3)
- System.Reflection (>= 4.3)
- System.Runtime (>= 4.3)
- System.Runtime (4.3.1)
- Microsoft.NETCore.Platforms (>= 1.1.1)
- Microsoft.NETCore.Targets (>= 1.1.3)
- System.Runtime.CompilerServices.Unsafe (6.1) - restriction: || (&& (== net8.0) (>= net462)) (== netstandard2.0)
- System.Runtime.Extensions (4.3.1)
- Microsoft.NETCore.Platforms (>= 1.1.1)
- Microsoft.NETCore.Targets (>= 1.1.3)
- System.Runtime (>= 4.3.1)
- System.Text.Encoding (4.3)
- Microsoft.NETCore.Platforms (>= 1.1)
- Microsoft.NETCore.Targets (>= 1.1)
- System.Runtime (>= 4.3)
- System.Threading (4.3)
- System.Runtime (>= 4.3)
- System.Threading.Tasks (>= 4.3)
- System.Threading.Tasks (4.3)
- Microsoft.NETCore.Platforms (>= 1.1)
- Microsoft.NETCore.Targets (>= 1.1)
- System.Runtime (>= 4.3)
- xunit.analyzers (1.18) - restriction: || (== net8.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0))
- xunit.runner.visualstudio (3.0)
- xunit.v3 (1.0)
- xunit.analyzers (>= 1.18) - restriction: || (== net8.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0))
- xunit.v3.assert (1.0) - restriction: || (== net8.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0))
- xunit.v3.core (1.0) - restriction: || (== net8.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0))
- xunit.v3.assert (1.0) - restriction: || (== net8.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0))
- xunit.v3.common (1.0) - restriction: || (== net8.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0))
- Microsoft.Bcl.AsyncInterfaces (>= 6.0)
- xunit.v3.core (1.0) - restriction: || (== net8.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0))
- Microsoft.Testing.Platform.MSBuild (>= 1.4.3) - restriction: || (== net8.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0))
- xunit.v3.extensibility.core (1.0) - restriction: || (== net8.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0))
- xunit.v3.runner.inproc.console (1.0) - restriction: || (== net8.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0))
- xunit.v3.extensibility.core (1.0) - restriction: || (== net8.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0))
- xunit.v3.common (1.0)
- xunit.v3.runner.common (1.0) - restriction: || (== net8.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0))
- xunit.v3.common (1.0)
- xunit.v3.runner.inproc.console (1.0) - restriction: || (== net8.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0))
- Microsoft.Testing.Extensions.TrxReport.Abstractions (>= 1.4.3) - restriction: || (== net8.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0))
- Microsoft.Testing.Platform (>= 1.4.3) - restriction: || (== net8.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0))
- xunit.v3.extensibility.core (1.0) - restriction: || (== net8.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0))
- xunit.v3.runner.common (1.0) - restriction: || (== net8.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net6.0))
diff --git a/src/FsUnit.MsTestUnit/FsUnit.MsTest.fsproj b/src/FsUnit.MsTestUnit/FsUnit.MsTest.fsproj
index b8259e5a..bcff2605 100644
--- a/src/FsUnit.MsTestUnit/FsUnit.MsTest.fsproj
+++ b/src/FsUnit.MsTestUnit/FsUnit.MsTest.fsproj
@@ -2,11 +2,12 @@
net8.0;netstandard2.0
FsUnit.MsTest
+ Fs30Unit.MsTest
+ FsUnit is a set of extensions that add special testing syntax to MsTest.
+ F# fsharp MsTest FsUnit
Library
false
-
-
- false
+ true
@@ -17,12 +18,11 @@
CustomMatchers.fs
-
-
-
- Always
-
-
+
+
+
+
+
+
-
-
\ No newline at end of file
+
diff --git a/src/FsUnit.MsTestUnit/FsUnitSample.fs.pp b/src/FsUnit.MsTestUnit/FsUnitSample.fs.pp
deleted file mode 100644
index 79edec98..00000000
--- a/src/FsUnit.MsTestUnit/FsUnitSample.fs.pp
+++ /dev/null
@@ -1,24 +0,0 @@
-namespace $rootnamespace$.Tests
-
-open Microsoft.VisualStudio.TestTools.UnitTesting
-open FsUnit.MsTest
-
-type LightBulb(state) =
- member x.On = state
- override x.ToString() =
- match x.On with
- | true -> "On"
- | false -> "Off"
-
-[]
-type ``Given a LightBulb that has had its state set to true`` ()=
- let lightBulb = LightBulb(true)
-
- [] member __.
- ``when I ask whether it is On it answers true.`` ()=
- lightBulb.On |> should be True
-
- [] member __.
- ``when I convert it to a string it becomes "On".`` ()=
- string lightBulb |> should equal "On"
-
diff --git a/src/FsUnit.MsTestUnit/paket.references b/src/FsUnit.MsTestUnit/paket.references
deleted file mode 100644
index 31bc36e1..00000000
--- a/src/FsUnit.MsTestUnit/paket.references
+++ /dev/null
@@ -1,3 +0,0 @@
-FSharp.Core
-NHamcrest
-MSTest.TestFramework
\ No newline at end of file
diff --git a/src/FsUnit.MsTestUnit/paket.template b/src/FsUnit.MsTestUnit/paket.template
deleted file mode 100644
index 88ec93a5..00000000
--- a/src/FsUnit.MsTestUnit/paket.template
+++ /dev/null
@@ -1,32 +0,0 @@
-type file
-id
- Fs30Unit.MsTest
-owners
- Ray Vernagus, Daniel Mohl, Sergey Tihon, Constantin Tews
-authors
- Ray Vernagus, Daniel Mohl, Sergey Tihon, Constantin Tews
-projectUrl
- https://github.com/fsprojects/FsUnit
-iconUrl
- https://raw.githubusercontent.com/fsprojects/FsUnit/master/docs/img/logo.png
-licenseUrl
- https://raw.githubusercontent.com/fsprojects/FsUnit/master/license.txt
-requireLicenseAcceptance
- false
-copyright
- Copyright 2012-2025
-tags
- F# fsharp MsTest FsUnit
-summary
- The goals of FsUnit are to make unit-testing feel more functional while leverage existing testing frameworks.
-description
- FsUnit is a set of extensions that add special testing syntax to MsTest.
-files
- ../../bin/FsUnit.MsTest/net8.0/FsUnit.* ==> lib/net8.0
- ../../bin/FsUnit.MsTest/netstandard2.0/FsUnit.* ==> lib/netstandard2.0
- ../../src/install.ps1 ==> tools
-
-dependencies
- MSTest.TestFramework >= LOCKEDVERSION
- NHamcrest >= LOCKEDVERSION
- FSharp.Core >= LOCKEDVERSION
diff --git a/src/FsUnit.MsTestUnit/sample.paket.template b/src/FsUnit.MsTestUnit/sample.paket.template
deleted file mode 100644
index dfa84899..00000000
--- a/src/FsUnit.MsTestUnit/sample.paket.template
+++ /dev/null
@@ -1,27 +0,0 @@
-type file
-id
- Fs30Unit.MsTest.Sample
-owners
- Ray Vernagus, Daniel Mohl, Sergey Tihon, Constantin Tews
-authors
- Ray Vernagus, Daniel Mohl, Sergey Tihon, Constantin Tews
-projectUrl
- https://github.com/fsprojects/FsUnit
-iconUrl
- https://raw.githubusercontent.com/fsprojects/FsUnit/master/docs/img/logo.png
-licenseUrl
- https://github.com/fsprojects/FsUnit/blob/master/license.txt
-requireLicenseAcceptance
- false
-copyright
- Copyright 2015-2025
-tags
- F# fsharp MsTest FsUnit
-summary
- The goals of FsUnit are to make unit-testing feel more functional while leverage existing testing frameworks.
-description
- FsUnit is a set of extensions that add special testing syntax to MsTest.
-dependencies
- Fs30Unit.MsTest
-files
- ../../bin/FsUnit.MsTest/**/*.pp ==> content
diff --git a/src/FsUnit.NUnit/FsUnit.NUnit.fsproj b/src/FsUnit.NUnit/FsUnit.NUnit.fsproj
index 362e9e98..ab92ef3b 100644
--- a/src/FsUnit.NUnit/FsUnit.NUnit.fsproj
+++ b/src/FsUnit.NUnit/FsUnit.NUnit.fsproj
@@ -1,13 +1,14 @@
- net8.0
+ net8.0;net462
FsUnit.NUnit
+ FsUnit
+ FsUnit is a set of extensions that add special testing syntax to NUnit.
+ F# fsharp NUnit FsUnit
Library
false
true
-
-
- false
+ true
@@ -19,12 +20,10 @@
-
-
-
- Always
-
-
+
+
+
+
+
-
-
\ No newline at end of file
+
diff --git a/src/FsUnit.NUnit/FsUnit.fs b/src/FsUnit.NUnit/FsUnit.fs
index 35dcece6..b3922b03 100644
--- a/src/FsUnit.NUnit/FsUnit.fs
+++ b/src/FsUnit.NUnit/FsUnit.fs
@@ -34,8 +34,8 @@ module TopLevelOperators =
let y =
match actual with
- | :? (unit -> unit) as testFunc -> box(System.Action(testFunc))
- | :? (unit -> obj) as testFunc -> box(System.Action(testFunc >> ignore))
+ | :? (unit -> unit) as testFunc -> box(new System.Action(testFunc))
+ | :? (unit -> obj) as testFunc -> box(new System.Action(testFunc >> ignore))
| _ -> actual
if isNull(box expression) then
@@ -87,7 +87,7 @@ module TopLevelOperators =
LessThanOrEqualConstraint(expected)
let shouldFail(f: unit -> unit) =
- System.Action(f) |> should throw typeof
+ new System.Action(f) |> should throw typeof
let endWith(expected: string) =
EndsWithConstraint expected
diff --git a/src/FsUnit.NUnit/FsUnitSample.fs.pp b/src/FsUnit.NUnit/FsUnitSample.fs.pp
deleted file mode 100644
index 17c67fd7..00000000
--- a/src/FsUnit.NUnit/FsUnitSample.fs.pp
+++ /dev/null
@@ -1,24 +0,0 @@
-namespace $rootnamespace$.Tests
-
-open NUnit.Framework
-open FsUnit
-
-type LightBulb(state) =
- member x.On = state
- override x.ToString() =
- match x.On with
- | true -> "On"
- | false -> "Off"
-
-[]
-type ``Given a LightBulb that has had its state set to true`` ()=
- let lightBulb = LightBulb(true)
-
- [] member __.
- ``when I ask whether it is On it answers true.`` ()=
- lightBulb.On |> should be True
-
- [] member __.
- ``when I convert it to a string it becomes "On".`` ()=
- string lightBulb |> should equal "On"
-
diff --git a/src/FsUnit.NUnit/FsUnitTyped.fs b/src/FsUnit.NUnit/FsUnitTyped.fs
index 8b225804..8a42f87f 100644
--- a/src/FsUnit.NUnit/FsUnitTyped.fs
+++ b/src/FsUnit.NUnit/FsUnitTyped.fs
@@ -36,7 +36,7 @@ module TopLevelOperators =
[]
let shouldFail<'exn when 'exn :> exn>(f: unit -> unit) =
- Assert.Throws(Is.InstanceOf<'exn>(), System.Action(f)) |> ignore
+ Assert.Throws(Is.InstanceOf<'exn>(), new System.Action(f)) |> ignore
[]
let shouldContainText (expected: string) (actual: string) =
diff --git a/src/FsUnit.NUnit/paket.references b/src/FsUnit.NUnit/paket.references
deleted file mode 100644
index 9e3b9fdb..00000000
--- a/src/FsUnit.NUnit/paket.references
+++ /dev/null
@@ -1,2 +0,0 @@
-FSharp.Core
-NUnit
\ No newline at end of file
diff --git a/src/FsUnit.NUnit/paket.template b/src/FsUnit.NUnit/paket.template
deleted file mode 100644
index f52940d3..00000000
--- a/src/FsUnit.NUnit/paket.template
+++ /dev/null
@@ -1,30 +0,0 @@
-type file
-id
- FsUnit
-owners
- Ray Vernagus, Daniel Mohl, Sergey Tihon, Constantin Tews
-authors
- Ray Vernagus, Daniel Mohl, Sergey Tihon, Constantin Tews
-projectUrl
- https://github.com/fsprojects/FsUnit
-iconUrl
- https://raw.githubusercontent.com/fsprojects/FsUnit/master/docs/img/logo.png
-licenseUrl
- https://raw.githubusercontent.com/fsprojects/FsUnit/master/license.txt
-requireLicenseAcceptance
- false
-copyright
- Copyright 2012-2025
-tags
- F# fsharp NUnit FsUnit
-summary
- The goals of FsUnit are to make unit-testing feel more functional while leverage existing testing frameworks.
-description
- FsUnit is a set of extensions that add special testing syntax to NUnit.
-files
- ../../bin/FsUnit.NUnit/net8.0/FsUnit.* ==> lib/net8.0
- ../../src/install.ps1 ==> tools
-
-dependencies
- NUnit >= LOCKEDVERSION
- FSharp.Core >= LOCKEDVERSION
diff --git a/src/FsUnit.NUnit/sample.paket.template b/src/FsUnit.NUnit/sample.paket.template
deleted file mode 100644
index 6522f710..00000000
--- a/src/FsUnit.NUnit/sample.paket.template
+++ /dev/null
@@ -1,27 +0,0 @@
-type file
-id
- FsUnit.Sample
-owners
- Ray Vernagus, Daniel Mohl, Sergey Tihon, Constantin Tews
-authors
- Ray Vernagus, Daniel Mohl, Sergey Tihon, Constantin Tews
-projectUrl
- https://github.com/fsprojects/FsUnit
-iconUrl
- https://raw.githubusercontent.com/fsprojects/FsUnit/master/docs/img/logo.png
-licenseUrl
- https://github.com/fsprojects/FsUnit/blob/master/license.txt
-requireLicenseAcceptance
- false
-copyright
- Copyright 2015-2025
-tags
- F# fsharp NUnit FsUnit
-summary
- The goals of FsUnit are to make unit-testing feel more functional while leverage existing testing frameworks.
-description
- FsUnit is a set of extensions that add special testing syntax to NUnit.
-dependencies
- FsUnit
-files
- ../../bin/FsUnit.NUnit/**/*.pp ==> content
diff --git a/src/FsUnit.Xunit/FsUnit.Xunit.fsproj b/src/FsUnit.Xunit/FsUnit.Xunit.fsproj
index a97bfc5c..bd5022c8 100644
--- a/src/FsUnit.Xunit/FsUnit.Xunit.fsproj
+++ b/src/FsUnit.Xunit/FsUnit.Xunit.fsproj
@@ -2,11 +2,13 @@
net8.0;netstandard2.0
FsUnit.Xunit
+ FsUnit.xUnit
+ FsUnit is a set of extensions that add special testing syntax to xUnit.
+ F# fsharp xUnit FsUnit
+ true
Library
false
-
-
- true
+ true
@@ -16,12 +18,12 @@
-
-
-
- Always
-
-
+
+
+
+
+
+
+
-
diff --git a/src/FsUnit.Xunit/FsUnitSample.fs.pp b/src/FsUnit.Xunit/FsUnitSample.fs.pp
deleted file mode 100644
index b8d34f65..00000000
--- a/src/FsUnit.Xunit/FsUnitSample.fs.pp
+++ /dev/null
@@ -1,23 +0,0 @@
-namespace $rootnamespace$.Tests
-
-open Xunit
-open FsUnit.Xunit
-
-type LightBulb(state) =
- member x.On = state
- override x.ToString() =
- match x.On with
- | true -> "On"
- | false -> "Off"
-
-type ``Given a LightBulb that has had its state set to true`` ()=
- let lightBulb = LightBulb(true)
-
- [] member __.
- ``when I ask whether it is On it answers true.`` ()=
- lightBulb.On |> should be True
-
- [] member __.
- ``when I convert it to a string it becomes "On".`` ()=
- string lightBulb |> should equal "On"
-
diff --git a/src/FsUnit.Xunit/paket.references b/src/FsUnit.Xunit/paket.references
deleted file mode 100644
index 7249a6f4..00000000
--- a/src/FsUnit.Xunit/paket.references
+++ /dev/null
@@ -1,3 +0,0 @@
-FSharp.Core
-NHamcrest
-xunit.v3
\ No newline at end of file
diff --git a/src/FsUnit.Xunit/paket.template b/src/FsUnit.Xunit/paket.template
deleted file mode 100644
index 1cf5a4b9..00000000
--- a/src/FsUnit.Xunit/paket.template
+++ /dev/null
@@ -1,32 +0,0 @@
-type file
-id
- FsUnit.xUnit
-owners
- Ray Vernagus, Daniel Mohl, Sergey Tihon, Constantin Tews
-authors
- Ray Vernagus, Daniel Mohl, Sergey Tihon, Constantin Tews
-projectUrl
- https://github.com/fsprojects/FsUnit
-iconUrl
- https://raw.githubusercontent.com/fsprojects/FsUnit/master/docs/img/logo.png
-licenseUrl
- https://raw.githubusercontent.com/fsprojects/FsUnit/master/license.txt
-requireLicenseAcceptance
- false
-copyright
- Copyright 2012-2025
-tags
- F# fsharp xUnit FsUnit
-summary
- The goals of FsUnit are to make unit-testing feel more functional while leverage existing testing frameworks.
-description
- FsUnit is a set of extensions that add special testing syntax to xUnit.
-files
- ../../bin/FsUnit.Xunit/net8.0/FsUnit.* ==> lib/net8.0
- ../../bin/FsUnit.Xunit/netstandard2.0/FsUnit.* ==> lib/netstandard2.0
- ../../src/install.ps1 ==> tools
-
-dependencies
- xunit.v3 >= LOCKEDVERSION
- NHamcrest >= LOCKEDVERSION
- FSharp.Core >= LOCKEDVERSION
diff --git a/src/FsUnit.Xunit/sample.paket.template b/src/FsUnit.Xunit/sample.paket.template
deleted file mode 100644
index 705a3f67..00000000
--- a/src/FsUnit.Xunit/sample.paket.template
+++ /dev/null
@@ -1,27 +0,0 @@
-type file
-id
- FsUnit.xUnit.Sample
-owners
- Ray Vernagus, Daniel Mohl, Sergey Tihon, Constantin Tews
-authors
- Ray Vernagus, Daniel Mohl, Sergey Tihon, Constantin Tews
-projectUrl
- https://github.com/fsprojects/FsUnit
-iconUrl
- https://raw.githubusercontent.com/fsprojects/FsUnit/master/docs/img/logo.png
-licenseUrl
- https://github.com/fsprojects/FsUnit/blob/master/license.txt
-requireLicenseAcceptance
- false
-copyright
- Copyright 2015-2025
-tags
- F# fsharp xUnit FsUnit
-summary
- The goals of FsUnit are to make unit-testing feel more functional while leverage existing testing frameworks.
-description
- FsUnit is a set of extensions that add special testing syntax to xUnit.
-dependencies
- FsUnit.xUnit
-files
- ../../bin/FsUnit.Xunit/**/*.pp ==> content
diff --git a/src/install.ps1 b/src/install.ps1
deleted file mode 100644
index faaa23e0..00000000
--- a/src/install.ps1
+++ /dev/null
@@ -1,3 +0,0 @@
-param($rootPath, $toolsPath, $package, $project)
-
-Add-BindingRedirect $project.Name
\ No newline at end of file
diff --git a/tests/FsUnit.MsTest.Test/FsUnit.MsTest.Test.fsproj b/tests/FsUnit.MsTest.Test/FsUnit.MsTest.Test.fsproj
index 96494ffb..f3b811fe 100644
--- a/tests/FsUnit.MsTest.Test/FsUnit.MsTest.Test.fsproj
+++ b/tests/FsUnit.MsTest.Test/FsUnit.MsTest.Test.fsproj
@@ -3,6 +3,8 @@
net8.0
true
+ Exe
+ true
@@ -39,11 +41,10 @@
-
-
+
+
-
\ No newline at end of file
diff --git a/tests/FsUnit.MsTest.Test/MSTest.runsettings b/tests/FsUnit.MsTest.Test/MSTest.runsettings
deleted file mode 100644
index 4bfe1ac4..00000000
--- a/tests/FsUnit.MsTest.Test/MSTest.runsettings
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
- true
-
-
diff --git a/tests/FsUnit.MsTest.Test/beGreaterThanTests.fs b/tests/FsUnit.MsTest.Test/beGreaterThanTests.fs
index 2ad248f1..f5ceb129 100644
--- a/tests/FsUnit.MsTest.Test/beGreaterThanTests.fs
+++ b/tests/FsUnit.MsTest.Test/beGreaterThanTests.fs
@@ -29,6 +29,6 @@ type ``beGreaterThanTests``() =
[]
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(f)
+ |> fun f -> Assert.ThrowsExactly(f)
|> fun e -> e.Message
|> should equal ("Greater than 9.2 was 9.2")
diff --git a/tests/FsUnit.MsTest.Test/beSubsetOfTests.fs b/tests/FsUnit.MsTest.Test/beSubsetOfTests.fs
index 8d540977..7e5f5f65 100644
--- a/tests/FsUnit.MsTest.Test/beSubsetOfTests.fs
+++ b/tests/FsUnit.MsTest.Test/beSubsetOfTests.fs
@@ -41,6 +41,6 @@ type ``beSubsetOfTests``() =
[]
member _.``11 should not be subset of 1 to 10 but message should be equal``() =
(fun () -> [ 11 ] |> should be (subsetOf [ 1..10 ]))
- |> fun f -> Assert.ThrowsException(f)
+ |> fun f -> Assert.ThrowsExactly(f)
|> fun e -> e.Message
|> should equal ("Is subset of [1; 2; 3; 4; 5; 6; 7; 8; 9; 10] was [11]")
diff --git a/tests/FsUnit.MsTest.Test/equalTests.fs b/tests/FsUnit.MsTest.Test/equalTests.fs
index cc5ffad8..28777460 100644
--- a/tests/FsUnit.MsTest.Test/equalTests.fs
+++ b/tests/FsUnit.MsTest.Test/equalTests.fs
@@ -105,7 +105,7 @@ type ``equalTests``() =
[]
member _.``Ok "foo" should fail on equal Ok "bar" but message should be equal``() =
(fun () -> Ok "foo" |> should equal (Ok "bar"))
- |> Assert.ThrowsException
+ |> Assert.ThrowsExactly
|> fun e -> e.Message
|> should equal ("Equals Ok \"bar\" was Ok \"foo\"")
diff --git a/tests/FsUnit.MsTest.Test/haveLengthTests.fs b/tests/FsUnit.MsTest.Test/haveLengthTests.fs
index 127df44e..761f4a3c 100644
--- a/tests/FsUnit.MsTest.Test/haveLengthTests.fs
+++ b/tests/FsUnit.MsTest.Test/haveLengthTests.fs
@@ -43,7 +43,7 @@ type ``haveLengthTests``() =
[]
member _.``Array with 1 item should fail to have Length 2 but message should be equal``() =
(fun () -> [| 1 |] |> should haveLength 2)
- |> fun f -> Assert.ThrowsException(f)
+ |> fun f -> Assert.ThrowsExactly(f)
|> fun e -> e.Message
|> should equal ("Have Length 2 was [|1|]")
diff --git a/tests/FsUnit.MsTest.Test/paket.references b/tests/FsUnit.MsTest.Test/paket.references
deleted file mode 100644
index 5c561114..00000000
--- a/tests/FsUnit.MsTest.Test/paket.references
+++ /dev/null
@@ -1,4 +0,0 @@
-FSharp.Core
-Microsoft.NET.Test.Sdk
-MSTest.TestAdapter
-MSTest.TestFramework
diff --git a/tests/FsUnit.MsTest.Test/startWithTests.fs b/tests/FsUnit.MsTest.Test/startWithTests.fs
index ba2320ba..4afa82cc 100644
--- a/tests/FsUnit.MsTest.Test/startWithTests.fs
+++ b/tests/FsUnit.MsTest.Test/startWithTests.fs
@@ -21,6 +21,6 @@ type ``startWithTests``() =
[]
member _.``ships should not start with ss but message should be equal``() =
(fun () -> "ships" |> should startWith "ss")
- |> fun f -> Assert.ThrowsException(f)
+ |> fun f -> Assert.ThrowsExactly(f)
|> fun e -> e.Message
|> should equal ("ss was \"ships\"")
diff --git a/tests/FsUnit.NUnit.Test/FsUnit.NUnit.Test.fsproj b/tests/FsUnit.NUnit.Test/FsUnit.NUnit.Test.fsproj
index 28638b24..ef82b45f 100644
--- a/tests/FsUnit.NUnit.Test/FsUnit.NUnit.Test.fsproj
+++ b/tests/FsUnit.NUnit.Test/FsUnit.NUnit.Test.fsproj
@@ -1,6 +1,8 @@
net8.0
+ Exe
+ true
false
@@ -46,10 +48,11 @@
-
+
+
+
-
\ No newline at end of file
diff --git a/tests/FsUnit.NUnit.Test/paket.references b/tests/FsUnit.NUnit.Test/paket.references
deleted file mode 100644
index cbaf0998..00000000
--- a/tests/FsUnit.NUnit.Test/paket.references
+++ /dev/null
@@ -1,5 +0,0 @@
-FSharp.Core
-Microsoft.NET.Test.Sdk
-NUnit
-NUnit3TestAdapter
-System.Collections.NonGeneric
\ No newline at end of file
diff --git a/tests/FsUnit.Xunit.Test/FsUnit.Xunit.Test.fsproj b/tests/FsUnit.Xunit.Test/FsUnit.Xunit.Test.fsproj
index 0ce5ca7a..6ef0635a 100644
--- a/tests/FsUnit.Xunit.Test/FsUnit.Xunit.Test.fsproj
+++ b/tests/FsUnit.Xunit.Test/FsUnit.Xunit.Test.fsproj
@@ -1,6 +1,8 @@
net8.0
+ Exe
+ true
@@ -46,10 +48,9 @@
-
+
-
diff --git a/tests/FsUnit.Xunit.Test/paket.references b/tests/FsUnit.Xunit.Test/paket.references
deleted file mode 100644
index 3217cb9c..00000000
--- a/tests/FsUnit.Xunit.Test/paket.references
+++ /dev/null
@@ -1,4 +0,0 @@
-FSharp.Core
-Microsoft.NET.Test.Sdk
-xunit.v3
-xunit.runner.visualstudio
\ No newline at end of file