コード例 #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);
        }
コード例 #2
0
        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);
        }
コード例 #4
0
        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);
        }