Beispiel #1
0
        public void ShouldSetProbeTemp()
        {
            // Arrange
            var sut = new GrillEmulator(currentGrillTemp: 0);

            // Act
            var initialState = sut.CurrentGrillTemp;
            var request      = new SetProbeTempRequest(temp: 200);

            var response = sut.HandleRequest(request) as MessageResponse;

            // Assert
            Assert.NotNull(response);
            Assert.Equal(0, initialState);
            Assert.Equal(200, sut.CurrentProbeTemp);
            Assert.Equal(Constants.ResponseCodes.OK, response.Message);
        }
Beispiel #2
0
 public IResponse HandleRequest(SetProbeTempRequest request)
 {
     TargetProbeTemp = request.DesiredTemperature;
     InterpolateTargetToCurrentProbeTemp();
     return(new MessageResponse("OK"));
 }
Beispiel #3
0
 public IResponse HandleRequest(SetProbeTempRequest request)
 {
     TargetProbeTemp = request.DesiredTemperature;
     return(new MessageResponse("OK"));
 }