Exemplo n.º 1
0
        public void SetChanceOfRain_ProperlySetsValue()
        {
            var builder      = new WeatherDataBuilder();
            var chanceOfRain = 10;

            builder.SetChanceOfRain(chanceOfRain);
            var data = builder.Build();

            Assert.Equal(chanceOfRain, data.ChanceOfRain);
        }
Exemplo n.º 2
0
        public void SetChanceOfRain_InvalidValue_ThrowsException(int value)
        {
            var builder = new WeatherDataBuilder();

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