Add failing test

This commit is contained in:
Smaug123
2024-06-23 18:40:27 +01:00
parent fb945c04ac
commit c09eb93b5e
2 changed files with 26 additions and 0 deletions

View File

@@ -10,6 +10,7 @@
<Compile Include="NoAttribute.fs" />
<Compile Include="Inconclusive.fs" />
<Compile Include="RunSubProcess.fs" />
<Compile Include="TestContext.fs" />
<Compile Include="TestNonParallel.fs" />
<Compile Include="TestParallel.fs" />
<Compile Include="TestStdout.fs" />

25
Consumer/TestContext.fs Normal file
View File

@@ -0,0 +1,25 @@
namespace Consumer
open FsUnitTyped
open NUnit.Framework
[<TestFixture>]
module TestContext =
[<TestCase 3>]
let ``Context has appropriate values`` (_ : int) =
TestContext.Progress.WriteLine "hi!"
TestContext.CurrentContext.Test.MethodName
|> shouldEqual "Context has appropriate values"
TestContext.CurrentContext.Test.Name
|> shouldEqual "Context has appropriate values(3)"
TestContext.CurrentContext.Test.Namespace |> shouldEqual "Consumer"
TestContext.CurrentContext.Test.ClassName |> shouldEqual "Consumer.TestContext"
TestContext.CurrentContext.Test.FullName
|> shouldEqual "Consumer.TestContext.Context has appropriate values(3)"
TestContext.CurrentContext.Test.Arguments |> List.ofArray |> shouldEqual [ 3 ]