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