Пример #1
0
        public void IfUpdateIsCalledWithBrewStartMessageTheWaterWillStartFlowing()
        {
            HotWaterSource hotWaterSource = new HotWaterSource(mockMessageSender.Object, mockMessageWatcher.Object);

            hotWaterSource.Update("Brew Start");

            Assert.That(hotWaterSource.waterIsFlowing, Is.True);
        }
Пример #2
0
        public void AHotWaterSourceThatHasStartedFillingWillHaveWaterFlowing()
        {
            HotWaterSource hotWaterSource = new HotWaterSource(mockMessageSender.Object, mockMessageWatcher.Object);

            hotWaterSource.StartFilling();

            Assert.That(hotWaterSource.waterIsFlowing, Is.True);
        }
Пример #3
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);
        }
Пример #4
0
        public void IfWaterSourceIsEmptyAndTheIfSourceEmptyIsCalled()
        {
            HotWaterSource hotWaterSource = new HotWaterSource(mockMessageSender.Object, mockMessageWatcher.Object);

            hotWaterSource.waterSourceEmpty = true;

            hotWaterSource.IfSourceIsEmpty();

            mockMessageSender.Verify(m => m.SendMessage("Water Source Empty"));
        }
Пример #5
0
 public void Init(UserInterface ui, HotWaterSource hws)
 {
     this.ui  = ui;
     this.hws = hws;
 }
 public void Initialize(HotWaterSource hotWaterSource, ContainmentVessel containmentVessel)
 {
     _hotWaterSource    = hotWaterSource;
     _containmentVessel = containmentVessel;
 }
Пример #7
0
 public void Init(HotWaterSource hws, ContainmentVessel cv)
 {
     this.hws = hws;
     this.cv  = cv;
 }
Пример #8
0
        public void AHotWaterSourceShouldNotBeNull()
        {
            HotWaterSource hotWaterSource = new HotWaterSource(mockMessageSender.Object, mockMessageWatcher.Object);

            Assert.That(hotWaterSource, Is.Not.Null);
        }
 public void Init(UserInterface userInterface, HotWaterSource hotWaterSource)
 {
     _userInterface  = userInterface;
     _hotWaterSource = hotWaterSource;
 }