public void TestThatSetLocationReturnsLocation() { MotionSensor sensor = new MotionSensor(); sensor.SetLocation("Main Door"); Assert.AreEqual("Main Door", sensor.GetLocation()); sensor.SetLocation("I have changed...change is inevitable"); Assert.AreNotEqual("Main Door", sensor.GetLocation()); }
public void TestThatGetLocationReturnsNull() { MotionSensor sensor = new MotionSensor(); string location = sensor.GetLocation(); Assert.AreEqual(string.Empty, location); }
public void TestThatGetLocationReturnsLocation() { MotionSensor sensor = new MotionSensor("Main Door"); string location = sensor.GetLocation(); Assert.AreEqual("Main Door", location); MotionSensor sensor_2 = new MotionSensor("Back Door"); string location_2 = sensor_2.GetLocation(); Assert.AreEqual("Back Door", location_2); }