public void WhenDecreaseMinusExistingGoesUnderMin_ThenSetToMin() { var sut = new SonosVolume(20); sut.Decrease(21); Assert.That(sut.Value, Is.EqualTo(SonosVolume.MinVolume)); }
public void WhenDecrease_ThenSetToExistingMinusDecrease() { var sut = new SonosVolume(50); sut.Decrease(20); Assert.That(sut.Value, Is.EqualTo(30)); }
public void WhenDecreaseAmountIsLessThanZero_ThenThrowException() { var sut = new SonosVolume(50); Assert.Throws <ArgumentOutOfRangeException>(() => sut.Decrease(-1)); }