예제 #1
0
        public void ShouldDiscard_WhenAnyReadingGreaterThanOrEqualTo3PpmOfReference()
        {
            var sensor = new MonoxideSensor("monoxide1", 5);

            sensor.AddReading("4");
            sensor.AddReading("7");
            sensor.AddReading("2");
            Assert.That(sensor.GetStatus(), Is.EqualTo("discard"));
        }
예제 #2
0
        public void ShouldKeep_WhenAllReadingsWithin3PpmOfReference()
        {
            var sensor = new MonoxideSensor("monoxide1", 5);

            sensor.AddReading("4");
            sensor.AddReading("7");
            sensor.AddReading("3");
            Assert.That(sensor.GetStatus(), Is.EqualTo("keep"));
        }