Exemplo n.º 1
0
        public async Task Should_complete_within_finishes()
        {
            // arrange
            var asyncAssertions = new AsyncActionAssertions(() => Tester(false));

            // act + assert
            await asyncAssertions.ShouldCompleteWithin(200.Milliseconds());
        }
Exemplo n.º 2
0
 public static async Task ShouldCompleteWithin(this Task task,
                                               TimeSpan time,
                                               string reason = "",
                                               params object[] reasonArgs)
 {
     var assertions = new AsyncActionAssertions(() => task);
     await assertions.ShouldCompleteWithin(time,
                                           reason,
                                           reasonArgs);
 }