public void HasNextTrueWhenInitialRun() { StepContext previous = new StepContext(); StepContext current = StepContext.InitialRun(previous, chunkSize: 2); Assert.That(current.HasNext, Is.True); }
public void IfPreviousAttemptWasTheFirstAttempThenRetryFirstItem() { StepContext previous = new StepContext { NumberOfItemsProcessed = 0, StepIndex = 0 }; StepContext current = StepContext.InitialRun(previous, chunkSize: 2); Assert.That(current.StepIndex, Is.EqualTo(0)); }
public void IfPreviousAttemptWasFailureThenRetryDuringRestart() { StepContext previous = new StepContext { NumberOfItemsProcessed = 0, StepIndex = 4 }; StepContext current = StepContext.InitialRun(previous, chunkSize: 2); Assert.That(current.StepIndex, Is.EqualTo(2)); Assert.IsTrue(current.IsInitialRun); }