Пример #1
0
        public void SetPressure_ProperlySetsValue()
        {
            var builder  = new WeatherDataBuilder();
            var pressure = 1010;

            builder.SetPressure(pressure);
            var data = builder.Build();

            Assert.Equal(pressure, data.Pressure);
        }
Пример #2
0
        public void SetPressure_InvalidValue_ThrowsException(int value)
        {
            var builder = new WeatherDataBuilder();

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