public void Execute_ZeroCountNumeric_ExactSequence() { var args = new CountNumericLoopStrategy(0, 1, 1); var resolver = new LoopSequenceResolver <decimal>(args); var elements = resolver.Execute(); Assert.That(elements.Count(), Is.EqualTo(0)); Assert.That(elements, Is.EqualTo(new List <decimal>())); }
public void Execute_SeedGreaterThanTerminalSentinelNumeric_ExactSequence() { var args = new SentinelCloseNumericLoopStrategy(10, 5, 2); var resolver = new LoopSequenceResolver <decimal>(args); var elements = resolver.Execute(); Assert.That(elements.Count(), Is.EqualTo(0)); Assert.That(elements, Is.EqualTo(new List <decimal>() { })); }
public void Execute_SentinelDateTime_ExactSequence() { var args = new SentinelCloseDateTimeLoopStrategy(new DateTime(2018, 1, 28), new DateTime(2018, 2, 2), new FixedDuration(new TimeSpan(2, 0, 0, 0))); var resolver = new LoopSequenceResolver <DateTime>(args); var elements = resolver.Execute(); Assert.That(elements.Count(), Is.EqualTo(3)); Assert.That(elements, Is.EqualTo(new List <DateTime>() { new DateTime(2018, 1, 28), new DateTime(2018, 1, 30), new DateTime(2018, 2, 1) })); }
public void Execute_SentinelHalfOpenNumeric_ExactSequence() { var args = new SentinelHalfOpenNumericLoopStrategy(1, 7, 2); var resolver = new LoopSequenceResolver <decimal>(args); var elements = resolver.Execute(); Assert.That(elements.Count(), Is.EqualTo(3)); Assert.That(elements, Is.EqualTo(new List <decimal>() { 1, 3, 5 })); }