diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json
index 9f4342d..37fc584 100644
--- a/.config/dotnet-tools.json
+++ b/.config/dotnet-tools.json
@@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"fake-cli": {
- "version": "5.20.4",
+ "version": "5.22.0",
"commands": [
"fake"
]
diff --git a/Directory.Build.props b/Directory.Build.props
index 8705d91..7dd4018 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -6,9 +6,8 @@
true
-
-
-
+
+
Phillip Trelford, Ruben Bartelink, Milos Chaloupka
@@ -28,9 +27,11 @@
true
snupkg
-
-
-
+
+ net472
+ netstandard2.1
+ net6.0
+
diff --git a/Examples/ByFeature/CustomContainer/CustomContainer.fsproj b/Examples/ByFeature/CustomContainer/CustomContainer.fsproj
index fcfe6d2..c11ec88 100644
--- a/Examples/ByFeature/CustomContainer/CustomContainer.fsproj
+++ b/Examples/ByFeature/CustomContainer/CustomContainer.fsproj
@@ -2,7 +2,7 @@
- net5.0;net452
+ $(DotNetCoreVersion);$(DotNetFrameworkVersion)
@@ -14,11 +14,14 @@
-
-
-
-
-
+
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
diff --git a/Examples/ByFeature/DependencyInjection/DependencyInjection.fsproj b/Examples/ByFeature/DependencyInjection/DependencyInjection.fsproj
index 114898a..b8b2cfe 100644
--- a/Examples/ByFeature/DependencyInjection/DependencyInjection.fsproj
+++ b/Examples/ByFeature/DependencyInjection/DependencyInjection.fsproj
@@ -2,7 +2,7 @@
- net5.0;net452
+ $(DotNetCoreVersion);$(DotNetFrameworkVersion)
@@ -14,8 +14,8 @@
-
-
-
+
+
+
\ No newline at end of file
diff --git a/Examples/ByFeature/FunctionalInjection/FunctionalInjection.fsproj b/Examples/ByFeature/FunctionalInjection/FunctionalInjection.fsproj
index 9033b6c..79bb56f 100644
--- a/Examples/ByFeature/FunctionalInjection/FunctionalInjection.fsproj
+++ b/Examples/ByFeature/FunctionalInjection/FunctionalInjection.fsproj
@@ -2,7 +2,7 @@
- net5.0;net452
+ $(DotNetCoreVersion);$(DotNetFrameworkVersion)
@@ -24,8 +24,8 @@
-
-
-
+
+
+
\ No newline at end of file
diff --git a/Examples/ByFeature/TaggedExamples/TaggedExamples.fsproj b/Examples/ByFeature/TaggedExamples/TaggedExamples.fsproj
index f3ce758..b55ab61 100644
--- a/Examples/ByFeature/TaggedExamples/TaggedExamples.fsproj
+++ b/Examples/ByFeature/TaggedExamples/TaggedExamples.fsproj
@@ -2,7 +2,7 @@
- net5.0;net452
+ $(DotNetCoreVersion);$(DotNetFrameworkVersion)
@@ -14,8 +14,8 @@
-
-
-
+
+
+
\ No newline at end of file
diff --git a/Examples/ByFramework/CommandLine/CSharp/CSharp.csproj b/Examples/ByFramework/CommandLine/CSharp/CSharp.csproj
index 426cadd..f08b51e 100644
--- a/Examples/ByFramework/CommandLine/CSharp/CSharp.csproj
+++ b/Examples/ByFramework/CommandLine/CSharp/CSharp.csproj
@@ -3,7 +3,7 @@
Exe
- net5.0;net452
+ $(DotNetCoreVersion);$(DotNetFrameworkVersion)
diff --git a/Examples/ByFramework/CommandLine/FSharp/FSharp.fsproj b/Examples/ByFramework/CommandLine/FSharp/FSharp.fsproj
index 7379a72..6b2cdf3 100644
--- a/Examples/ByFramework/CommandLine/FSharp/FSharp.fsproj
+++ b/Examples/ByFramework/CommandLine/FSharp/FSharp.fsproj
@@ -3,7 +3,7 @@
Exe
- net5.0;net452
+ $(DotNetCoreVersion);$(DotNetFrameworkVersion)
diff --git a/Examples/ByFramework/CommandLine/TicTacToe/TicTacToe.fsproj b/Examples/ByFramework/CommandLine/TicTacToe/TicTacToe.fsproj
index 81e047e..d257e4b 100644
--- a/Examples/ByFramework/CommandLine/TicTacToe/TicTacToe.fsproj
+++ b/Examples/ByFramework/CommandLine/TicTacToe/TicTacToe.fsproj
@@ -3,7 +3,7 @@
Exe
- net5.0;net452
+ $(DotNetCoreVersion);$(DotNetFrameworkVersion)
diff --git a/Examples/ByFramework/Expecto/FSharp.Expecto/Expecto.FSharp.fsproj b/Examples/ByFramework/Expecto/FSharp.Expecto/Expecto.FSharp.fsproj
index 92c586d..75652ed 100644
--- a/Examples/ByFramework/Expecto/FSharp.Expecto/Expecto.FSharp.fsproj
+++ b/Examples/ByFramework/Expecto/FSharp.Expecto/Expecto.FSharp.fsproj
@@ -2,7 +2,7 @@
- net5.0
+ $(DotNetCoreVersion)
Exe
False
@@ -22,8 +22,8 @@
-
-
-
+
+
+
diff --git a/Examples/ByFramework/MSTest/MSTest.FSharp/MSTest.FSharp.fsproj b/Examples/ByFramework/MSTest/MSTest.FSharp/MSTest.FSharp.fsproj
index dde9ed2..fda6ae4 100644
--- a/Examples/ByFramework/MSTest/MSTest.FSharp/MSTest.FSharp.fsproj
+++ b/Examples/ByFramework/MSTest/MSTest.FSharp/MSTest.FSharp.fsproj
@@ -2,7 +2,7 @@
- net5.0;net452
+ $(DotNetCoreVersion);$(DotNetFrameworkVersion)
@@ -12,9 +12,9 @@
-
-
-
+
+
+
diff --git a/Examples/ByFramework/NUnit/CSharp.NUnit/NUnit.CSharp.csproj b/Examples/ByFramework/NUnit/CSharp.NUnit/NUnit.CSharp.csproj
index 6eb2208..6c42e19 100644
--- a/Examples/ByFramework/NUnit/CSharp.NUnit/NUnit.CSharp.csproj
+++ b/Examples/ByFramework/NUnit/CSharp.NUnit/NUnit.CSharp.csproj
@@ -2,7 +2,7 @@
- net5.0;net452
+ $(DotNetCoreVersion);$(DotNetFrameworkVersion)
@@ -12,8 +12,8 @@
-
-
-
+
+
+
\ No newline at end of file
diff --git a/Examples/ByFramework/NUnit/FSharp.NUnit/NUnit.FSharp.fsproj b/Examples/ByFramework/NUnit/FSharp.NUnit/NUnit.FSharp.fsproj
index 4600667..b6a604d 100644
--- a/Examples/ByFramework/NUnit/FSharp.NUnit/NUnit.FSharp.fsproj
+++ b/Examples/ByFramework/NUnit/FSharp.NUnit/NUnit.FSharp.fsproj
@@ -2,7 +2,7 @@
- net5.0;net452
+ $(DotNetCoreVersion);$(DotNetFrameworkVersion)
@@ -14,8 +14,8 @@
-
-
-
+
+
+
\ No newline at end of file
diff --git a/Examples/ByFramework/xUnit/FSharp.xUnit/Xunit.FSharp.fsproj b/Examples/ByFramework/xUnit/FSharp.xUnit/Xunit.FSharp.fsproj
index 02eb3ca..0231504 100644
--- a/Examples/ByFramework/xUnit/FSharp.xUnit/Xunit.FSharp.fsproj
+++ b/Examples/ByFramework/xUnit/FSharp.xUnit/Xunit.FSharp.fsproj
@@ -2,7 +2,7 @@
- net5.0;net452
+ $(DotNetCoreVersion);$(DotNetFrameworkVersion)
@@ -16,9 +16,12 @@
-
-
-
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
diff --git a/Examples/ByStyle/Attributes/Attributes.fsproj b/Examples/ByStyle/Attributes/Attributes.fsproj
index d277535..8f6a878 100644
--- a/Examples/ByStyle/Attributes/Attributes.fsproj
+++ b/Examples/ByStyle/Attributes/Attributes.fsproj
@@ -2,7 +2,7 @@
- net5.0;net452
+ $(DotNetCoreVersion);$(DotNetFrameworkVersion)
@@ -38,8 +38,8 @@
-
-
-
+
+
+
\ No newline at end of file
diff --git a/Examples/ByStyle/Functional/Functional.fsproj b/Examples/ByStyle/Functional/Functional.fsproj
index 9017c49..0ed1099 100644
--- a/Examples/ByStyle/Functional/Functional.fsproj
+++ b/Examples/ByStyle/Functional/Functional.fsproj
@@ -2,7 +2,7 @@
- net5.0;net452
+ $(DotNetCoreVersion);$(DotNetFrameworkVersion)
@@ -18,8 +18,8 @@
-
-
-
+
+
+
\ No newline at end of file
diff --git a/Examples/ByStyle/Interactive/Interactive.fsproj b/Examples/ByStyle/Interactive/Interactive.fsproj
index 8bbc1ee..5e95c1e 100644
--- a/Examples/ByStyle/Interactive/Interactive.fsproj
+++ b/Examples/ByStyle/Interactive/Interactive.fsproj
@@ -2,7 +2,7 @@
- net5.0;net452
+ $(DotNetCoreVersion);$(DotNetFrameworkVersion)
diff --git a/README.md b/README.md
index 4baade7..d74db92 100644
--- a/README.md
+++ b/README.md
@@ -17,8 +17,8 @@ Example video: http://www.youtube.com/watch?v=UuTL3nj9fIE
Simply reference TickSpec via [NuGet or Paket](https://www.nuget.org/packages/TickSpec/), download the assembly or build the project from source.
-- The binary should work cleanly on any .NET Standard 2.0, .NET 4.5 or later environment.
-- The TickSpec solution file works with Visual Studio 2017.
+- The binary should work cleanly on any .NET Standard 2.1, .NET 4.7.2 or later environment.
+- The TickSpec solution file works with Visual Studio 2022.
- Historically, Silverlight was supported; this support and the related examples were removed in 2017 (but remain in the commit history for the archeologically inclined)
- Useful samples are available in the Examples folder https://github.com/fsprojects/TickSpec/tree/master/Examples/ and depending your choice, this one is a good start : https://github.com/fsprojects/TickSpec/tree/master/Examples/ByFramework
diff --git a/TickSpec.Tests/TickSpec.Tests.fsproj b/TickSpec.Tests/TickSpec.Tests.fsproj
index 9245f1c..486299e 100644
--- a/TickSpec.Tests/TickSpec.Tests.fsproj
+++ b/TickSpec.Tests/TickSpec.Tests.fsproj
@@ -2,7 +2,7 @@
- net5.0;net452
+ $(DotNetCoreVersion);$(DotNetFrameworkVersion)
@@ -12,9 +12,9 @@
-
-
-
+
+
+
\ No newline at end of file
diff --git a/TickSpec.sln b/TickSpec.sln
index da8ad5f..679186a 100644
--- a/TickSpec.sln
+++ b/TickSpec.sln
@@ -1,7 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.27130.2027
+# Visual Studio Version 17
+VisualStudioVersion = 17.0.32126.317
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Examples", "Examples", "{CD7A2701-42ED-47BD-8724-1E130B5C5071}"
EndProject
@@ -33,11 +33,15 @@ Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Functional", "Examples\BySt
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "._", "._", "{51B6BE98-A176-4315-83F5-54800BC03EB4}"
ProjectSection(SolutionItems) = preProject
- .travis.yml = .travis.yml
+ .gitattributes = .gitattributes
+ .gitignore = .gitignore
appveyor.yml = appveyor.yml
build.bat = build.bat
build.fsx = build.fsx
- build.sh = build.sh
+ Directory.Build.props = Directory.Build.props
+ .config\dotnet-tools.json = .config\dotnet-tools.json
+ LICENSE.txt = LICENSE.txt
+ netfx.props = netfx.props
README.md = README.md
RELEASE_NOTES.md = RELEASE_NOTES.md
EndProjectSection
@@ -54,7 +58,7 @@ Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "DependencyInjection", "Exam
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FunctionalInjection", "Examples\ByFeature\FunctionalInjection\FunctionalInjection.fsproj", "{1CE6B475-C94F-438E-97D4-5E99FD0F04D4}"
EndProject
-Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "TickSpec.Tests", "TickSpec.Tests\TickSpec.Tests.fsproj", "{CD2AA807-5E4F-4A2C-80F7-A7D7CA6B3C2D}"
+Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "TickSpec.Tests", "TickSpec.Tests\TickSpec.Tests.fsproj", "{CD2AA807-5E4F-4A2C-80F7-A7D7CA6B3C2D}"
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "TaggedExamples", "Examples\ByFeature\TaggedExamples\TaggedExamples.fsproj", "{39C63F8E-F3A5-48D8-851C-62BEB9C701C2}"
EndProject
@@ -64,11 +68,11 @@ Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "MSTest.FSharp", "Examples\B
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Expecto", "Expecto", "{750A854A-FB45-4E51-94DF-D79B4F1E46DC}"
EndProject
-Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Expecto.FSharp", "Examples\ByFramework\Expecto\FSharp.Expecto\Expecto.FSharp.fsproj", "{F9B139E4-0160-4150-B420-73DCCD57B6B8}"
+Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Expecto.FSharp", "Examples\ByFramework\Expecto\FSharp.Expecto\Expecto.FSharp.fsproj", "{F9B139E4-0160-4150-B420-73DCCD57B6B8}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Wiring", "Wiring", "{373B654A-3A88-48CC-A0A3-0454514E61FF}"
EndProject
-Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "TickSpec.Xunit", "Wiring\TickSpec.Xunit\TickSpec.Xunit.fsproj", "{DDB39875-AA8B-494E-B923-C8143930464F}"
+Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "TickSpec.Xunit", "Wiring\TickSpec.Xunit\TickSpec.Xunit.fsproj", "{DDB39875-AA8B-494E-B923-C8143930464F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
diff --git a/TickSpec/FeatureGen.fs b/TickSpec/FeatureGen.fs
index b3eac16..a2e3912 100644
--- a/TickSpec/FeatureGen.fs
+++ b/TickSpec/FeatureGen.fs
@@ -1,6 +1,6 @@
namespace TickSpec
-#if !NETSTANDARD2_0
+#if !NETSTANDARD2_1
open System
open System.Collections.Generic
open System.Diagnostics
diff --git a/TickSpec/ScenarioGen.fs b/TickSpec/ScenarioGen.fs
index 78c8529..343cc9b 100644
--- a/TickSpec/ScenarioGen.fs
+++ b/TickSpec/ScenarioGen.fs
@@ -1,6 +1,6 @@
module internal TickSpec.ScenarioGen
-#if !NETSTANDARD2_0
+#if !NETSTANDARD2_1
open System
open System.Collections.Generic
open System.Reflection
diff --git a/TickSpec/ServiceProvider.fs b/TickSpec/ServiceProvider.fs
index 90a8ba1..71ae65f 100644
--- a/TickSpec/ServiceProvider.fs
+++ b/TickSpec/ServiceProvider.fs
@@ -26,6 +26,11 @@ type InstanceStore () =
distinctAddRec key value (head :: revHead) rest
distinctAddRec key value [] inList
+ let disposeAsync (d:IAsyncDisposable) =
+ d.DisposeAsync()
+ |> ignore
+ ()
+
/// Stores element (skips storing existing, old element removed and new prepended)
member this.Store key value =
instances <- instances |> distinctAdd key value
@@ -36,11 +41,13 @@ type InstanceStore () =
| Some elem -> Some(snd elem)
| None -> None
+
interface IDisposable with
member __.Dispose() =
instances
|> Seq.map snd
|> Seq.iter (function
+ | :? IAsyncDisposable as d -> disposeAsync(d)
| :? IDisposable as d -> d.Dispose()
| _ -> ())
instances <- []
diff --git a/TickSpec/TickSpec.fs b/TickSpec/TickSpec.fs
index 6651800..dd632bf 100644
--- a/TickSpec/TickSpec.fs
+++ b/TickSpec/TickSpec.fs
@@ -15,7 +15,7 @@ type StepDefinitions (givens,whens,thens,events,valueParsers) =
static let getStepAttributes (m:MemberInfo) =
Attribute.GetCustomAttributes(m,typeof)
static let isMethodInScope (feature:string) (scenario:ScenarioSource) (scopedTags,scopedFeatures,scopedScenarios,m) =
- let trim p (s:string) =
+ let trim (p:string) (s:string) =
if s.StartsWith p then (s.Substring p.Length).Trim() else s
let tagged =
match scopedTags with
@@ -204,7 +204,7 @@ type StepDefinitions (givens,whens,thens,events,valueParsers) =
member __.GenerateFeature (sourceUrl:string,lines:string[]) =
let featureSource = parseFeature lines
let feature = featureSource.Name
-#if !NETSTANDARD2_0
+#if !NETSTANDARD2_1
let gen = FeatureGen(featureSource.Name,sourceUrl)
let genType scenario =
let lines =
diff --git a/TickSpec/TickSpec.fsproj b/TickSpec/TickSpec.fsproj
index f25edc8..d50ad75 100644
--- a/TickSpec/TickSpec.fsproj
+++ b/TickSpec/TickSpec.fsproj
@@ -2,15 +2,13 @@
- netstandard2.0;net452
+ $(DotNetStandardVersion);$(DotNetFrameworkVersion)
TickSpec
-
- TickSpec is a lightweight Behaviour Driven Development (BDD) framework for .Net.
- Describe behaviour in plain text using the Gherkin business language, i.e. Given,
- When, Then. Easily execute the behaviour against matching F# 'ticked' methods
- (let ``tick method`` () = true) or attributed C# or F# methods.
-
+ README.md
+
+
+
@@ -29,4 +27,10 @@
+
+
+ True
+ \
+
+
diff --git a/Wiring/TickSpec.Xunit/TickSpec.Xunit.fsproj b/Wiring/TickSpec.Xunit/TickSpec.Xunit.fsproj
index e121869..0e57da5 100644
--- a/Wiring/TickSpec.Xunit/TickSpec.Xunit.fsproj
+++ b/Wiring/TickSpec.Xunit/TickSpec.Xunit.fsproj
@@ -2,7 +2,7 @@
- netstandard2.0;net452
+ $(DotNetStandardVersion);$(DotNetFrameworkVersion)
TickSpec.Xunit
TickSpec integration with Xunit.
@@ -18,6 +18,6 @@
-
+
diff --git a/appveyor.yml b/appveyor.yml
index 534ec6f..42be65e 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -2,7 +2,7 @@
skip_branch_with_pr: true
image:
- - Visual Studio 2019
+ - Visual Studio 2022
- Ubuntu2004
before_build:
# Display .NET Core version
diff --git a/build.fsx b/build.fsx
index 930f416..15d7846 100644
--- a/build.fsx
+++ b/build.fsx
@@ -101,7 +101,7 @@ Target.create "Build" (fun _ ->
Target.create "Test" (fun _ ->
// Xunit seems to be failing under Linux with net452 runner, let's just skip it
// the .NET 4 tests all together there
- let framework = if Environment.isWindows then None else Some "net5.0"
+ let framework = if Environment.isWindows then None else Some "net6.0"
let logger = if AppVeyor.detect () then "Appveyor" |> Some else None
Sln
diff --git a/netfx.props b/netfx.props
index c41b419..240e247 100644
--- a/netfx.props
+++ b/netfx.props
@@ -20,6 +20,7 @@
$(BaseFrameworkPathOverrideForMono)/4.6.2-api
$(BaseFrameworkPathOverrideForMono)/4.7-api
$(BaseFrameworkPathOverrideForMono)/4.7.1-api
+ $(BaseFrameworkPathOverrideForMono)/4.7.2-api
true