コード例 #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);
 }