コード例 #1
0
 @Test
 public void testModifyWrap() {
   ArrayList<Note> result = block.modify(new Note(Note.NOTE_ON, 46)); // Bb
   assertEquals(46, result.get(0).getPitch()); // Bb
   assertEquals(48, result.get(1).getPitch()); // C
   assertEquals(50, result.get(2).getPitch()); // D
 }
コード例 #2
0
 @Test
 public void testModify() {
   ArrayList<Note> result = block.modify(note);
   assertEquals(48, result.get(0).getPitch());
   assertEquals(50, result.get(1).getPitch());
   assertEquals(52, result.get(2).getPitch());
 }
コード例 #3
0
 @Test
 public void testModifyScale() {
   client.getMusicManager().setScale("major", "C");
   ArrayList<Note> result = block.modify(note);
   assertEquals(48, result.get(0).getPitch()); // C
   assertEquals(52, result.get(1).getPitch()); // E
   assertEquals(55, result.get(2).getPitch()); // G
 }
コード例 #4
0
 @Test
 public void testNoteOutOfScale() {
   client.getMusicManager().setScale("major", "C");
   ArrayList<Note> result = block.modify(new Note(Note.NOTE_ON, 46)); // Bb
   assertEquals(0, result.size());
 }