예제 #1
0
        public void WhenCallingPutTheBoilerIsRetreived(bool IsElementOn, bool IsPumpOn, bool IsBurstOn, bool IsAuto, decimal TargetTemp, decimal TempOffset, decimal ActualTemp)
        {
            MockRepository repo     = new MockRepository();
            Boiler         boilerIn = new Boiler(IsElementOn, IsPumpOn, IsBurstOn, IsAuto, TargetTemp, TempOffset, ActualTemp);

            BoilerController controller = new BoilerController(repo);

            Boiler boilerOut = controller.Put(boilerIn);

            Assert.Equal(boilerIn, boilerOut);
        }
        public void WhenCallingPostTheBoilerIsRetreived(bool IsElementOn, bool IsPumpOn, bool IsBurstOn, bool IsAuto, decimal TargetTemp, decimal TempOffset, decimal ActualTemp)
        {
            MockRepository repo = new MockRepository();
            Boiler boilerIn = new Boiler(IsElementOn, IsPumpOn, IsBurstOn, IsAuto, TargetTemp, TempOffset, ActualTemp);

            BoilerController controller = new BoilerController(repo);

            Boiler boilerOut = controller.Post(boilerIn);

            Assert.Equal(boilerIn, boilerOut);
        }
예제 #3
0
        public void WhenCallingPostTheBoilerIsSaved(bool IsElementOn, bool IsPumpOn, bool IsBurstOn, bool IsAuto, decimal TargetTemp, decimal TempOffset, decimal ActualTemp)
        {
            MockRepository repo     = new MockRepository();
            Boiler         boilerIn = new Boiler(IsElementOn, IsPumpOn, IsBurstOn, IsAuto, TargetTemp, TempOffset, ActualTemp);

            BoilerController controller = new BoilerController(repo);

            controller.Post(boilerIn);

            Boiler boilerSaved = (Boiler)repo.Retrieve();

            Assert.Equal(boilerIn, boilerSaved);
        }
        public void WhenCallingPutTheBoilerIsSaved(bool IsElementOn, bool IsPumpOn, bool IsBurstOn, bool IsAuto, decimal TargetTemp, decimal TempOffset, decimal ActualTemp)
        {
            MockRepository repo = new MockRepository();
            Boiler boilerIn = new Boiler(IsElementOn, IsPumpOn, IsBurstOn, IsAuto, TargetTemp, TempOffset, ActualTemp);

            BoilerController controller = new BoilerController(repo);

            controller.Put(boilerIn);

            Boiler boilerSaved = (Boiler)repo.Retrieve();

            Assert.Equal(boilerIn, boilerSaved);
        }