Пример #1
0
        public void CorrectTempReading()
        {
            ContainerType      Pilsner     = new ContainerType(1, 4, 6, "Pilsner");
            IThermometer       thermometer = new StubThermometer("therm1", 4.1);
            Monitor            monitor     = new Monitor(thermometer, Pilsner);
            TemperatureReading reading     = monitor.Check();

            Assert.Equal(thermometer.Temperature(), reading.Temperature);
        }
Пример #2
0
        public void FailingTemp_Under()
        {
            ContainerType      Pilsner     = new ContainerType(1, 4, 6, "Pilsner");
            IThermometer       thermometer = new StubThermometer("therm1", 3.99);
            Monitor            monitor     = new Monitor(thermometer, Pilsner);
            TemperatureReading reading     = monitor.Check();

            Assert.Equal(TemperatureStatus.Under, reading.Status);
        }