Skip to content

Commit

Permalink
reviewed unittest for WaitControl
Browse files Browse the repository at this point in the history
  • Loading branch information
Fernando Cerqueira committed Jul 25, 2023
1 parent 208ac45 commit 9683318
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions UnitTests/Controls/TaskWaitControl/WaitControlTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ public void Should_TryResulNotAcceptEsc()
var result = ctrl.TryResult(CancellationToken.None);
Assert.True(!result.IsAborted);
Assert.False(result.IsRunning);
Assert.True(result.Value.States.First().ElapsedTime > TimeSpan.FromSeconds(2));
Assert.True(result.Value.States.First().ElapsedTime > TimeSpan.Zero);
});
}

Expand Down Expand Up @@ -416,7 +416,7 @@ public void Should_EventAbortParallel()
{
var result = ctrl.TryResult(cts.Token);
Assert.False(result.IsAborted);
Assert.Equal(2, result.Value.States.Count(x => x.Status == TaskStatus.Canceled));
Assert.True(result.Value.States.Count(x => x.Status == TaskStatus.Canceled) >=2);
});
}

Expand Down

0 comments on commit 9683318

Please sign in to comment.