@Test public void testGetSurroundingOctaveNotesReturnsSameNotesOctaveAboveAndBelow() { List<BasicNote> notes = Arrays.asList(BasicNote.cNatural(), BasicNote.gNatural()); List<MainNoteComponent> result = generator.generateSurroundingMainNotesForTrebleClef(notes, 1); List<MainNoteComponent> expected = Arrays.asList( new MainNoteComponent(BasicNote.cNatural(), 0), new MainNoteComponent(BasicNote.cNatural(), 1), new MainNoteComponent(BasicNote.cNatural(), 2), new MainNoteComponent(BasicNote.gNatural(), 0), new MainNoteComponent(BasicNote.gNatural(), 1), new MainNoteComponent(BasicNote.gNatural(), 2)); assertThat(result, equalTo(expected)); }
@Test public void testGetSurroundingOctaveNotesForHighOctaveDoesNotReturnAboveTheNoteLimit() { List<BasicNote> notes = Arrays.asList(BasicNote.cNatural(), BasicNote.gNatural()); List<MainNoteComponent> result = generator.generateSurroundingMainNotesForTrebleClef(notes, 2); List<MainNoteComponent> expected = Arrays.asList( new MainNoteComponent(BasicNote.cNatural(), 1), new MainNoteComponent(BasicNote.cNatural(), 2), new MainNoteComponent(BasicNote.cNatural(), 3), new MainNoteComponent(BasicNote.gNatural(), 1), new MainNoteComponent(BasicNote.gNatural(), 2)); assertThat(result, equalTo(expected)); }