mirror of
https://github.com/Smaug123/unofficial-nunit-runner
synced 2025-12-15 01:35:39 +00:00
Add failing test
This commit is contained in:
@@ -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
25
Consumer/TestContext.fs
Normal 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 ]
|
||||
Reference in New Issue
Block a user