public void Day_should_equal_number_of_days_since_last_rollover() { var startInstant = Instant.MinValue; for (var i = 0; i < SeedGenerator.DaysPerSeed; i++) { var fakeClock = new FakeClock(startInstant.Plus(Duration.FromDays(i))); var seed = new SeedGenerator(fakeClock); seed.GetCurrent().DaysSinceRollover.Should().Be(i); } }
public void Value_should_be_same_for_n_days() { var startInstant = Instant.MinValue; var seeds = new List <int>(); for (var i = 0; i < SeedGenerator.DaysPerSeed; i++) { var fakeClock = new FakeClock(startInstant.Plus(Duration.FromDays(i))); var seed = new SeedGenerator(fakeClock); seeds.Add(seed.GetCurrent().Value); } var first = seeds.First(); seeds.All(x => x == first).Should().BeTrue(); }