コード例 #1
0
        public void SupressSensorTest()
        {
            LightSensor ls = new LightSensor();
            FireSensor  fs = new FireSensor();
            DoorSensor  ds = new DoorSensor();

            Alarm lsA = ls.triggerSensor();
            Alarm fsA = fs.triggerSensor();
            Alarm dsA = ds.triggerSensor();

            ls.Deactivate();
            fs.Deactivate();
            ds.Deactivate();

            bool lsStatus = ls.checkStatus();
            bool fsStatus = fs.checkStatus();
            bool dsStatus = ds.checkStatus();

            Assert.IsFalse(lsStatus);
            Assert.IsFalse(fsStatus);
            Assert.IsFalse(dsStatus);
        }