public void TraditionalSwitchWithoutConstraintTest(bool initialState, Lightswitch.ALightSwitch.State expected) { TraditionalLightSwitch testSwitch = new TraditionalLightSwitch("Traditional Switch", initialState); testSwitch.ToggleSwitch(); Assert.Equal(expected, testSwitch.CurrentState); }
public void TraditionalSwitchWithConstraintTest(bool initialState, string testTime, ALightSwitch.State expected) { TraditionalLightSwitch testSwitch = new TraditionalLightSwitch("Traditinal Switch", initialState, true); TimeSpan time = TimeSpan.Parse(testTime); testSwitch.SetTimeOfDay(time); testSwitch.ToggleSwitch(); Assert.Equal(expected, testSwitch.CurrentState); }