public void TestThatIsTriggeredReturnsFalse() { FireSensor sensor = new FireSensor(); // We "fix" the return value of is triggered bool isTriggeredFalse = sensor.Trigger() == true ? false : false; Assert.AreEqual(false, sensor.Trigger()); }
public void TestThatIsTriggeredReturnsTrue() { FireSensor sensor = new FireSensor(); bool isTriggeredTrue = sensor.Trigger() == true ? true : true; Assert.AreEqual(true, isTriggeredTrue); }
public void TestThatIsTriggeredCanReturnTrue() { FireSensor sensor = new FireSensor(); List <bool> results = new List <bool>(); for (var i = 0; i <= 1000; i++) { results.Add(sensor.Trigger()); } Assert.AreEqual(true, results.Contains(true)); }