Example #1
0
            public void WhenIncreasePlusExistingGoesOverMax_ThenSetToMax()
            {
                var sut = new SonosVolume(50);

                sut.Increase(51);

                Assert.That(sut.Value, Is.EqualTo(SonosVolume.MaxVolume));
            }
Example #2
0
            public void WhenIncrease_ThenSetToExistingPlusIncrease()
            {
                var sut = new SonosVolume(50);

                sut.Increase(15);

                Assert.That(sut.Value, Is.EqualTo(65));
            }
Example #3
0
            public void WhenIncreaseAmountIsLessThanZero_ThenThrowException()
            {
                var sut = new SonosVolume(50);

                Assert.Throws <ArgumentOutOfRangeException>(() => sut.Increase(-1));
            }