public void WhenIncreasePlusExistingGoesOverMax_ThenSetToMax() { var sut = new SonosVolume(50); sut.Increase(51); Assert.That(sut.Value, Is.EqualTo(SonosVolume.MaxVolume)); }
public void WhenIncrease_ThenSetToExistingPlusIncrease() { var sut = new SonosVolume(50); sut.Increase(15); Assert.That(sut.Value, Is.EqualTo(65)); }
public void WhenIncreaseAmountIsLessThanZero_ThenThrowException() { var sut = new SonosVolume(50); Assert.Throws <ArgumentOutOfRangeException>(() => sut.Increase(-1)); }