Exemplo n.º 1
0
        public void IfUpdateIsCalledWithVesselFullMessageWeShouldTurnOffWaterFlow()
        {
            HotWaterSource hotWaterSource = new HotWaterSource(mockMessageSender.Object, mockMessageWatcher.Object);

            hotWaterSource.Update("Brew Start");
            hotWaterSource.Update("Containment Vessel Full");

            Assert.That(hotWaterSource.waterIsFlowing, Is.False);
        }
Exemplo n.º 2
0
        public void IfUpdateIsCalledWithBrewStartMessageTheWaterWillStartFlowing()
        {
            HotWaterSource hotWaterSource = new HotWaterSource(mockMessageSender.Object, mockMessageWatcher.Object);

            hotWaterSource.Update("Brew Start");

            Assert.That(hotWaterSource.waterIsFlowing, Is.True);
        }