Beispiel #1
0
        public void CanMapToMqtt(string mqttValue, string googleValue, object value, string expectedResult)
        {
            // Arrange
            var mapper = new ValueMap
            {
                Google = googleValue,
                Mqtt   = mqttValue
            };

            // Act
            var matches = mapper.MatchesGoogle(value);
            var result  = mapper.ConvertToMqtt(value);

            // Assert
            Assert.True(matches);
            Assert.Equal(expectedResult, result);
        }