public void StatelessSwitchWithoutConstraintTest(bool initialState, ALightSwitch.State expected) { StatelessLightSwitch testSwitch = new StatelessLightSwitch("Stateless Switch", initialState); testSwitch.ToggleSwitch(); Assert.Equal(expected, testSwitch.CurrentState); }
public void StatelessSwitchWithConstraintTest(bool initialState, string testTime, ALightSwitch.State expected) { StatelessLightSwitch testSwitch = new StatelessLightSwitch("Traditinal Switch", initialState, true); TimeSpan time = TimeSpan.Parse(testTime); testSwitch.SetTimeOfDay(time); testSwitch.ToggleSwitch(); Assert.Equal(expected, testSwitch.CurrentState); }