public void Test_TrafficLight_PowerOn() { //arrange ThreeColorTrafficLight tl = new ThreeColorTrafficLight(1, 10, 2000); //act tl.PowerOn(); //assert tl.IsPowerOn.Should().BeTrue(); }
public void Test_TrafficLight_SetInterval() { //arrange ThreeColorTrafficLight tl = new ThreeColorTrafficLight(1, 10, 2000); //act tl.PowerOn(); tl.TimerInterval = 200; //assert tl.TimerInterval.Should().Be(200); }
public void Test_PowerStation_PowerOnAllTrafficLights() { //arrange SimplePowerStation sps = new SimplePowerStation(50); ThreeColorTrafficLight tl = new ThreeColorTrafficLight(1, 10, 500); ThreeColorTrafficLight tl2 = new ThreeColorTrafficLight(2, 20, 500); sps.AddTrafficLight(tl); sps.AddTrafficLight(tl2); //act sps.PowerOnAllTrafficLights(); //assert tl.IsPowerOn.Should().BeTrue(); }