public async Task Should_complete_within_finishes_throws_exception() { // arrange var asyncAssertions = new AsyncActionAssertions(ThrowException); // act + assert await asyncAssertions.InvokingAsync(a => a.ShouldCompleteWithin(200.Milliseconds())) .ShouldThrow <ArgumentException>(); }
public async Task Should_complete_within_doesntfinish() { // arrange var asyncAssertions = new AsyncActionAssertions(() => Tester(false)); // act + assert await asyncAssertions.InvokingAsync(a => a.ShouldCompleteWithin(50.Milliseconds())) .ShouldThrow <AssertionException>(); }