@Test public void shouldSetCorrectMidSynthOptionIds() { synthTemplateOptions.setMidSynthOptions(progressionUnitBar); SynthTemplateOption option = progressionUnitBar.getSynthTemplateMidOptions().get(0).stream().filter(s -> s.getId() == 21 && s.getName().equalsIgnoreCase("midsynth") && s.getSynthRoll() == SynthTemplateOption.SynthRoll.SYNTH_MID).findFirst().get(); Assert.assertNotNull(option); option = progressionUnitBar.getSynthTemplateMidOptions().get(0).stream().filter(s -> s.getId() == 22 && s.getName().equalsIgnoreCase("midsynthalt") && s.getSynthRoll() == SynthTemplateOption.SynthRoll.SYNTH_MID).findFirst().get(); Assert.assertNotNull(option); }
@Override public void setMidSynthOptions(ProgressionUnitBar progressionUnitBar) { List<List<SynthTemplateOption>> allMidOptions = new ArrayList<>(); for (SynthTemplate synthTemplate : progressionUnitBar.getSynthTemplates()) { SynthTemplateOption synthMid = new SynthTemplateOption(synthTemplate.getMidSynthId(), synthTemplate.getMidSynthName(), SynthTemplateOption.SynthRoll.SYNTH_MID); SynthTemplateOption synthMidAlt = new SynthTemplateOption(synthTemplate.getMidSynthIdAlt(), synthTemplate.getMidSynthNameAlt(), SynthTemplateOption.SynthRoll.SYNTH_MID); List<SynthTemplateOption> midOptions = new ArrayList<>(); midOptions.add(synthMid); midOptions.add(synthMidAlt); allMidOptions.add(midOptions); } progressionUnitBar.setSynthTemplateMidOptions(allMidOptions); }
SynthTemplateOptions implements ISynthTemplateOptions { @Override public void setMidSynthOptions(ProgressionUnitBar progressionUnitBar) { List<List<SynthTemplateOption>> allMidOptions = new ArrayList<>(); for (SynthTemplate synthTemplate : progressionUnitBar.getSynthTemplates()) { SynthTemplateOption synthMid = new SynthTemplateOption(synthTemplate.getMidSynthId(), synthTemplate.getMidSynthName(), SynthTemplateOption.SynthRoll.SYNTH_MID); SynthTemplateOption synthMidAlt = new SynthTemplateOption(synthTemplate.getMidSynthIdAlt(), synthTemplate.getMidSynthNameAlt(), SynthTemplateOption.SynthRoll.SYNTH_MID); List<SynthTemplateOption> midOptions = new ArrayList<>(); midOptions.add(synthMid); midOptions.add(synthMidAlt); allMidOptions.add(midOptions); } progressionUnitBar.setSynthTemplateMidOptions(allMidOptions); } }
SynthTemplateOptions implements ISynthTemplateOptions { @Override public void setMidSynthOptions(ProgressionUnitBar progressionUnitBar) { List<List<SynthTemplateOption>> allMidOptions = new ArrayList<>(); for (SynthTemplate synthTemplate : progressionUnitBar.getSynthTemplates()) { SynthTemplateOption synthMid = new SynthTemplateOption(synthTemplate.getMidSynthId(), synthTemplate.getMidSynthName(), SynthTemplateOption.SynthRoll.SYNTH_MID); SynthTemplateOption synthMidAlt = new SynthTemplateOption(synthTemplate.getMidSynthIdAlt(), synthTemplate.getMidSynthNameAlt(), SynthTemplateOption.SynthRoll.SYNTH_MID); List<SynthTemplateOption> midOptions = new ArrayList<>(); midOptions.add(synthMid); midOptions.add(synthMidAlt); allMidOptions.add(midOptions); } progressionUnitBar.setSynthTemplateMidOptions(allMidOptions); }  }
SynthTemplateOptions implements ISynthTemplateOptions { @Override public void setMidSynthOptions(ProgressionUnitBar progressionUnitBar) { List<List<SynthTemplateOption>> allMidOptions = new ArrayList<>(); for (SynthTemplate synthTemplate : progressionUnitBar.getSynthTemplates()) { SynthTemplateOption synthMid = new SynthTemplateOption(synthTemplate.getMidSynthId(), synthTemplate.getMidSynthName(), SynthTemplateOption.SynthRoll.SYNTH_MID); SynthTemplateOption synthMidAlt = new SynthTemplateOption(synthTemplate.getMidSynthIdAlt(), synthTemplate.getMidSynthNameAlt(), SynthTemplateOption.SynthRoll.SYNTH_MID); List<SynthTemplateOption> midOptions = new ArrayList<>(); midOptions.add(synthMid); midOptions.add(synthMidAlt); allMidOptions.add(midOptions); } progressionUnitBar.setSynthTemplateMidOptions(allMidOptions); }  @Override void setHiSynthOptions(ProgressionUnitBar progressionUnitBar); @Override void setMidSynthOptions(ProgressionUnitBar progressionUnitBar); @Override void setLowSynthOptions(ProgressionUnitBar progressionUnitBar); }
SynthTemplateOptions implements ISynthTemplateOptions { @Override public void setMidSynthOptions(ProgressionUnitBar progressionUnitBar) { List<List<SynthTemplateOption>> allMidOptions = new ArrayList<>(); for (SynthTemplate synthTemplate : progressionUnitBar.getSynthTemplates()) { SynthTemplateOption synthMid = new SynthTemplateOption(synthTemplate.getMidSynthId(), synthTemplate.getMidSynthName(), SynthTemplateOption.SynthRoll.SYNTH_MID); SynthTemplateOption synthMidAlt = new SynthTemplateOption(synthTemplate.getMidSynthIdAlt(), synthTemplate.getMidSynthNameAlt(), SynthTemplateOption.SynthRoll.SYNTH_MID); List<SynthTemplateOption> midOptions = new ArrayList<>(); midOptions.add(synthMid); midOptions.add(synthMidAlt); allMidOptions.add(midOptions); } progressionUnitBar.setSynthTemplateMidOptions(allMidOptions); }  @Override void setHiSynthOptions(ProgressionUnitBar progressionUnitBar); @Override void setMidSynthOptions(ProgressionUnitBar progressionUnitBar); @Override void setLowSynthOptions(ProgressionUnitBar progressionUnitBar);  }