Skip to content

Commit

Permalink
Issue 4491
Browse files Browse the repository at this point in the history
  • Loading branch information
OsirisTerje committed Oct 10, 2023
1 parent 62c1336 commit 8b23d4c
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Issue4281/UnitTest1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,13 @@ public void TestDelayed()
Assert.That(()=>Count(),Is.GreaterThan(10).After(2).Seconds.PollEvery(500));
}

[Test]
public void TestDelayedWithoutPollEvery()
{
stopWatch.Start();
Assert.That(() => Count(), Is.GreaterThan(10).After(2000,500));
}

private int Count()
{
var ts = stopWatch.Elapsed;
Expand Down
1 change: 1 addition & 0 deletions Issue4491/GlobalUsings.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
global using NUnit.Framework;
20 changes: 20 additions & 0 deletions Issue4491/Issue4491.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="NUnit" Version="4.0.0-beta.1" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageReference Include="NUnit.Analyzers" Version="3.8.0" />
<PackageReference Include="coverlet.collector" Version="6.0.0" />
</ItemGroup>

</Project>
20 changes: 20 additions & 0 deletions Issue4491/UnitTest1.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
namespace Issue4491;

public class Tests
{
[Test]
[Repeat(30)]
public void Test1()
{
bool x = true;
Assert.That(x, Is.False);
}

[Test]
[Repeat(30)]
public void Test2()
{
bool x = true;
Assert.That(x, Is.True);
}
}

0 comments on commit 8b23d4c

Please sign in to comment.