Exemplo n.º 1
0
        public void ShouldSetTheCommandFromTheResponse()
        {
            string message         = "41 09 55";
            string expectedCommand = "4109";

            _response = new FuelTrimResponse();
            _response.Parse(message);
            Assert.AreEqual(expectedCommand, _response.Command);
        }
Exemplo n.º 2
0
        public void ShouldReturnNullWhenWrongCommand()
        {
            string message = "41 01 55";

            _response = new FuelTrimResponse();
            var result = _response.Parse(message);

            Assert.IsNull(result);
        }
Exemplo n.º 3
0
        public void ShouldParseTheResponse()
        {
            string message      = "41 07 55";
            double expectedTrim = -33.59375;

            _response = new FuelTrimResponse();
            _response.Parse(message);
            Assert.AreEqual(expectedTrim, _response.FuelTrim);
        }