예제 #1
0
 public static void Assert(this IAssertConfiguration configuration, Repeated repeatValidation)
 {
     configuration.MustHaveHappened(repeatValidation);
 }
예제 #2
0
 public static void MustHaveHappened(this IAssertConfiguration configuration, Expression <Func <int, bool> > repeatPredicate)
 {
     configuration.MustHaveHappened(Repeated.Like(repeatPredicate));
 }
예제 #3
0
 public static Repeated Like(Expression <Func <int, bool> > repeatValidation)
 {
     return(Repeated.Like(repeatValidation));
 }
예제 #4
0
 public static LowerBoundRepeated Times(int numberOfTimes)
 {
     return(Repeated.Times(numberOfTimes));
 }
예제 #5
0
 private void AssertSuccessfullyLaunched(int remainingTimes, Repeated currentCalls)
 {
     Assert.True(_hook.Launch());
     A.CallTo(() => _service.StartCommand()).MustHaveHappened(currentCalls);
     _hook.RemainingTimes.Should().Be(remainingTimes);
 }
예제 #6
0
 private void AssertLaunchedWithError(int remainingTimes, Repeated currentCalls)
 {
     Assert.False(_hook.Launch());
     A.CallTo(() => _service.StartCommand()).MustHaveHappened(currentCalls);
     Assert.AreEqual(remainingTimes, _hook.RemainingTimes);
 }