// restToStringTest(): integer duration, decimal duration @Test public void restToStringTest() { Rest a = new Rest(5); Rest b = new Rest(4.5); assertEquals(".5.0", a.toString()); assertEquals(".4.5", b.toString()); }
// restPlayTest(): @Test public void restPlayTest() { Rest a = new Rest(5); try { SequencePlayer player = new SequencePlayer(140, 12); a.play(player, 0); assertEquals("Meta event: END_OF_TRACK Tick: 0\n", player.toString()); } catch (MidiUnavailableException mue) { mue.printStackTrace(); } catch (InvalidMidiDataException imde) { imde.printStackTrace(); } }
// restEqualsFalseTest(): covers all false partitions @Test public void restEqualsFalseTest() { Rest a = new Rest(5); Rest b = new Rest(10); assertFalse(a.equals(b)); }
// restHashCodeTest() @Test public void restHashCodeTest() { Rest a = new Rest(5); Rest b = new Rest(5); assertEquals(a.hashCode(), b.hashCode()); }
// restTransposeTest() @Test public void restTransposeTest() { Rest a = new Rest(5); Rest b = new Rest(5); assertEquals(a, b.transpose(2)); }
// restDurationTest() @Test public void restDurationTest() { Rest a = new Rest(5); assertTrue(5 == a.duration()); }
// restConstructorTest() @Test public void restConstructorTest() { Rest a = new Rest(5); assertEquals(".5.0", a.toString()); }