public void Piano_Disable_WhenKeyDoesNotExist_ShouldDoNothing() { // Arrange Piano p = new Piano(); int oct = Piano.BASE_OCTAAF + Piano.OCTAVEN; string letter = "C"; bool special = false; // Act p.Disable(oct, letter, special); // Assert Assert.IsNull(p.FindKey(oct, letter, special)); }
public void Piano_Disable_WhenKeyExists_ShouldSetEnabledToTrue() { // Arrange Piano p = new Piano(); int oct = Piano.BASE_OCTAAF; string letter = "C"; bool special = false; // Act p.Enable(oct, letter, special); p.Disable(oct, letter, special); // Assert PianoKey pk = p.FindKey(oct, letter, special); Assert.IsNotNull(pk); Assert.IsFalse(pk.Enabled); }