示例#1
0
        public void SetHumidity_ProperlySetsValue()
        {
            var builder  = new WeatherDataBuilder();
            var humidity = 56;

            builder.SetHumidity(humidity);
            var data = builder.Build();

            Assert.Equal(humidity, data.Humidity);
        }
示例#2
0
        public void SetHumidity_InvalidValue_ThrowsException(int value)
        {
            var builder = new WeatherDataBuilder();

            Assert.ThrowsAny <InvalidOperationException>(() => builder.SetHumidity(value));
        }