@Test public void shouldSetCorrectHiSynthOptionIds(){ synthTemplateOptions.setHiSynthOptions(progressionUnitBar); SynthTemplateOption option = progressionUnitBar.getSynthTemplateHiOptions().get(0).stream().filter(s -> s.getId() == 11 && s.getName().equalsIgnoreCase("hisynth") && s.getSynthRoll() == SynthTemplateOption.SynthRoll.SYNTH_HI).findFirst().get(); Assert.assertNotNull(option); option = progressionUnitBar.getSynthTemplateHiOptions().get(0).stream().filter(s -> s.getId() == 12 && s.getName().equalsIgnoreCase("hisynthalt") && s.getSynthRoll() == SynthTemplateOption.SynthRoll.SYNTH_HI).findFirst().get(); Assert.assertNotNull(option); }
@Override public void setHiSynthOptions(ProgressionUnitBar progressionUnitBar) { List<List<SynthTemplateOption>> allHiOptions = new ArrayList<>(); for (SynthTemplate synthTemplate : progressionUnitBar.getSynthTemplates()) { SynthTemplateOption synthHi = new SynthTemplateOption(synthTemplate.getHiSynthId(), synthTemplate.getHiSynthName(), SynthTemplateOption.SynthRoll.SYNTH_HI); SynthTemplateOption synthHiAlt = new SynthTemplateOption(synthTemplate.getHiSynthIdAlt(), synthTemplate.getHiSynthNameAlt(), SynthTemplateOption.SynthRoll.SYNTH_HI); List<SynthTemplateOption> hiOptions = new ArrayList<>(); hiOptions.add(synthHi); hiOptions.add(synthHiAlt); allHiOptions.add(hiOptions); } progressionUnitBar.setSynthTemplateHiOptions(allHiOptions); }
SynthTemplateOptions implements ISynthTemplateOptions { @Override public void setHiSynthOptions(ProgressionUnitBar progressionUnitBar) { List<List<SynthTemplateOption>> allHiOptions = new ArrayList<>(); for (SynthTemplate synthTemplate : progressionUnitBar.getSynthTemplates()) { SynthTemplateOption synthHi = new SynthTemplateOption(synthTemplate.getHiSynthId(), synthTemplate.getHiSynthName(), SynthTemplateOption.SynthRoll.SYNTH_HI); SynthTemplateOption synthHiAlt = new SynthTemplateOption(synthTemplate.getHiSynthIdAlt(), synthTemplate.getHiSynthNameAlt(), SynthTemplateOption.SynthRoll.SYNTH_HI); List<SynthTemplateOption> hiOptions = new ArrayList<>(); hiOptions.add(synthHi); hiOptions.add(synthHiAlt); allHiOptions.add(hiOptions); } progressionUnitBar.setSynthTemplateHiOptions(allHiOptions); } }
SynthTemplateOptions implements ISynthTemplateOptions { @Override public void setHiSynthOptions(ProgressionUnitBar progressionUnitBar) { List<List<SynthTemplateOption>> allHiOptions = new ArrayList<>(); for (SynthTemplate synthTemplate : progressionUnitBar.getSynthTemplates()) { SynthTemplateOption synthHi = new SynthTemplateOption(synthTemplate.getHiSynthId(), synthTemplate.getHiSynthName(), SynthTemplateOption.SynthRoll.SYNTH_HI); SynthTemplateOption synthHiAlt = new SynthTemplateOption(synthTemplate.getHiSynthIdAlt(), synthTemplate.getHiSynthNameAlt(), SynthTemplateOption.SynthRoll.SYNTH_HI); List<SynthTemplateOption> hiOptions = new ArrayList<>(); hiOptions.add(synthHi); hiOptions.add(synthHiAlt); allHiOptions.add(hiOptions); } progressionUnitBar.setSynthTemplateHiOptions(allHiOptions); }  }
SynthTemplateOptions implements ISynthTemplateOptions { @Override public void setHiSynthOptions(ProgressionUnitBar progressionUnitBar) { List<List<SynthTemplateOption>> allHiOptions = new ArrayList<>(); for (SynthTemplate synthTemplate : progressionUnitBar.getSynthTemplates()) { SynthTemplateOption synthHi = new SynthTemplateOption(synthTemplate.getHiSynthId(), synthTemplate.getHiSynthName(), SynthTemplateOption.SynthRoll.SYNTH_HI); SynthTemplateOption synthHiAlt = new SynthTemplateOption(synthTemplate.getHiSynthIdAlt(), synthTemplate.getHiSynthNameAlt(), SynthTemplateOption.SynthRoll.SYNTH_HI); List<SynthTemplateOption> hiOptions = new ArrayList<>(); hiOptions.add(synthHi); hiOptions.add(synthHiAlt); allHiOptions.add(hiOptions); } progressionUnitBar.setSynthTemplateHiOptions(allHiOptions); }  @Override void setHiSynthOptions(ProgressionUnitBar progressionUnitBar); @Override void setMidSynthOptions(ProgressionUnitBar progressionUnitBar); @Override void setLowSynthOptions(ProgressionUnitBar progressionUnitBar); }
SynthTemplateOptions implements ISynthTemplateOptions { @Override public void setHiSynthOptions(ProgressionUnitBar progressionUnitBar) { List<List<SynthTemplateOption>> allHiOptions = new ArrayList<>(); for (SynthTemplate synthTemplate : progressionUnitBar.getSynthTemplates()) { SynthTemplateOption synthHi = new SynthTemplateOption(synthTemplate.getHiSynthId(), synthTemplate.getHiSynthName(), SynthTemplateOption.SynthRoll.SYNTH_HI); SynthTemplateOption synthHiAlt = new SynthTemplateOption(synthTemplate.getHiSynthIdAlt(), synthTemplate.getHiSynthNameAlt(), SynthTemplateOption.SynthRoll.SYNTH_HI); List<SynthTemplateOption> hiOptions = new ArrayList<>(); hiOptions.add(synthHi); hiOptions.add(synthHiAlt); allHiOptions.add(hiOptions); } progressionUnitBar.setSynthTemplateHiOptions(allHiOptions); }  @Override void setHiSynthOptions(ProgressionUnitBar progressionUnitBar); @Override void setMidSynthOptions(ProgressionUnitBar progressionUnitBar); @Override void setLowSynthOptions(ProgressionUnitBar progressionUnitBar);  }