public void IsOngoing_OneTimes_TrueThenFalse() { var strategy = new CountNumericLoopStrategy(1, 3, 2); Assert.That(strategy.IsOngoing(), Is.True); strategy.GetNext(); Assert.That(strategy.IsOngoing(), Is.False); }
public void Run_parameters_CorrectResult(int count, decimal seed, decimal step, decimal expected) { var strategy = new CountNumericLoopStrategy(count, seed, step); var final = 0m; while (strategy.IsOngoing()) { final = strategy.GetNext(); } Assert.That(final, Is.EqualTo(expected)); }
public void IsOngoing_NTimes_True() { var strategy = new CountNumericLoopStrategy(10, 3, 2); Assert.That(strategy.IsOngoing(), Is.True); }
public void IsOngoing_ZeroTimes_False() { var strategy = new CountNumericLoopStrategy(0, 3, 2); Assert.That(strategy.IsOngoing(), Is.False); }