コード例 #1
0
        public void TestThatSetLocationReturnsLocation()
        {
            CO2Sensor sensor = new CO2Sensor();

            sensor.SetLocation("Main Door");
            Assert.AreEqual("Main Door", sensor.GetLocation());
            sensor.SetLocation("I have changed...change is inevitable");
            Assert.AreNotEqual("Main Door", sensor.GetLocation());
            Assert.AreEqual("I have changed...change is inevitable", sensor.GetLocation());
        }