public void Can_get_time_of_day_state_for_current_real_world_time_upper_limit() { // Arrange var manager = new TimePeriodManager(this.CreateStates()); var time = new DateTime(2015, 8, 2, 18, 0, 0); // Act ITimePeriod state = manager.GetTimeOfDayState(time); // Assert Assert.AreEqual(18, state.StateStartTime.Hour); Assert.AreEqual(0, state.StateStartTime.Minute); }
public void Can_get_time_of_day_state_when_states_are_out_of_order() { // Arrange var manager = new TimePeriodManager(this.CreateStates()); var time = new DateTime(2015, 8, 2, 16, 0, 0); // Act ITimePeriod state = manager.GetTimeOfDayState(time); // Assert Assert.AreEqual(15, state.StateStartTime.Hour); Assert.AreEqual(0, state.StateStartTime.Minute); }