public void YieldAllInstances_WhenCalled_ReturnsASingleInstance() { var single = new SingleDaySchedule(DateTime.MinValue); var count = single.YieldAllInstances().Count(); Assert.That(count, Is.EqualTo(1)); }
public void GetInstance_WhenCalledWithZeroIndex_MatchesFirstYieldedInstance() { var single = new SingleDaySchedule(DateTime.MinValue); var first = single.YieldAllInstances().First(); var zero = single.GetInstance(0); Assert.That(zero, Is.EqualTo(first)); }