Пример #1
0
 // noteToStringTest(): integer duration, decimal duration
 @Test
 public void noteToStringTest() {
   Note a2 = new Note(2, new Pitch('A'));
   Note a3 = new Note(.25, new Pitch('A'));
   assertEquals("A2.0", a2.toString());
   assertEquals("A0.25", a3.toString());
 }
Пример #2
0
 // noteConstructorTest()
 @Test
 public void noteConstructorTest() {
   Note a = new Note(.1 / 5, new Pitch('A'));
   assertEquals("A0.02", a.toString());
 }