public void CanRunZeroCycleBatch() { var runToCompletion = RunToCompletion(ExecutionOptions.Batch(ArbitraryViewCycleExecutionSequence.Create(new DateTimeOffset[] { }))); Assert.Empty(runToCompletion.Item1); Assert.Empty(runToCompletion.Item2); }
public void CanRunManyCycleBatch() { var valuationTimes = new[] { DateTimeOffset.Now, DateTimeOffset.Now - TimeSpan.FromDays(5), DateTimeOffset.Now - TimeSpan.FromDays(1) }; var runToCompletion = RunToCompletion(ExecutionOptions.Batch(ArbitraryViewCycleExecutionSequence.Create(valuationTimes))); Assert.Equal(valuationTimes.Count(), runToCompletion.Item2.Count()); foreach (var t in runToCompletion.Item2.Zip(valuationTimes, Tuple.Create)) { DateTimeOffset expected = t.Item2; DateTimeOffset actual = t.Item1.FullResult.ValuationTime; AssertApproximatelyEqual(actual, expected); } }