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")); }
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")); }