public void a_pressure_value_out_of_range_should_raise_the_alarm()
        {
            StubSensor stubSensor = new StubSensor();
            stubSensor.StubCallToPopNextPressurePsiValue(Alarm.LowPressureTreshold -1);
            Alarm target = new Alarm(stubSensor);

            target.Check();

            Assert.AreEqual(true, target.AlarmOn, "alarm on");
        }
        public void a_normal_pressure_value_should_not_raise_the_alarm()
        {
            StubSensor stubSensor = new StubSensor();
            stubSensor.StubCallToPopNextPressurePsiValue(Alarm.LowPressureTreshold);
            Alarm target = new Alarm(stubSensor);

            target.Check();

            Assert.AreEqual(false, target.AlarmOn, "alarm on");
        }
Exemplo n.º 3
0
        public void a_normal_pressure_value_should_not_raise_the_alarm()
        {
            StubSensor stubSensor = new StubSensor();

            stubSensor.StubCallToPopNextPressurePsiValue(Alarm.LowPressureTreshold);
            Alarm target = new Alarm(stubSensor);

            target.Check();

            Assert.AreEqual(false, target.AlarmOn, "alarm on");
        }
Exemplo n.º 4
0
        public void a_pressure_value_out_of_range_should_raise_the_alarm()
        {
            StubSensor stubSensor = new StubSensor();

            stubSensor.StubCallToPopNextPressurePsiValue(Alarm.LowPressureTreshold - 1);
            Alarm target = new Alarm(stubSensor);

            target.Check();

            Assert.AreEqual(true, target.AlarmOn, "alarm on");
        }