@Test public void shouldSetCorrectNumberOfSynthTemplates(){ QueueState queueState = createTestQueue(); synthTemplateAppenderEvent.set(queueState); queueState.getStructure().forEach(progressionUnit -> progressionUnit.getProgressionUnitBars().forEach(progressionUnitBar -> { assertThat(progressionUnitBar.getSynthTemplates()).hasSize(1); })); }
@Override public QueueState set(QueueState queueState) { try { SynthTemplate synthTemplate = templateSelector.chooseSpecific(11); queueState.getQueueItem().getProgression().getStructure().forEach(pUnit -> { pUnit.getProgressionUnitBars().forEach(pBar -> { pBar.setSynthTemplates(Arrays.asList(synthTemplate)); }); }); } catch (Exception e) { Application.logger.debug("LOG:", e); } return queueState; }
SynthTemplateAppenderEvent implements IEventChain { @Override public QueueState set(QueueState queueState) { try { SynthTemplate synthTemplate = templateSelector.chooseSpecific(11); queueState.getQueueItem().getProgression().getStructure().forEach(pUnit -> { pUnit.getProgressionUnitBars().forEach(pBar -> { pBar.setSynthTemplates(Arrays.asList(synthTemplate)); }); }); } catch (Exception e) { Application.logger.debug("LOG:", e); } return queueState; } }
SynthTemplateAppenderEvent implements IEventChain { @Override public QueueState set(QueueState queueState) { try { SynthTemplate synthTemplate = templateSelector.chooseSpecific(11); queueState.getQueueItem().getProgression().getStructure().forEach(pUnit -> { pUnit.getProgressionUnitBars().forEach(pBar -> { pBar.setSynthTemplates(Arrays.asList(synthTemplate)); }); }); } catch (Exception e) { Application.logger.debug("LOG:", e); } return queueState; }  }
SynthTemplateAppenderEvent implements IEventChain { @Override public QueueState set(QueueState queueState) { try { SynthTemplate synthTemplate = templateSelector.chooseSpecific(11); queueState.getQueueItem().getProgression().getStructure().forEach(pUnit -> { pUnit.getProgressionUnitBars().forEach(pBar -> { pBar.setSynthTemplates(Arrays.asList(synthTemplate)); }); }); } catch (Exception e) { Application.logger.debug("LOG:", e); } return queueState; }  void init(ITemplateSelector templateSelector, Integer numOfGeneratedMixes); @Override QueueState set(QueueState queueState); }
SynthTemplateAppenderEvent implements IEventChain { @Override public QueueState set(QueueState queueState) { try { SynthTemplate synthTemplate = templateSelector.chooseSpecific(11); queueState.getQueueItem().getProgression().getStructure().forEach(pUnit -> { pUnit.getProgressionUnitBars().forEach(pBar -> { pBar.setSynthTemplates(Arrays.asList(synthTemplate)); }); }); } catch (Exception e) { Application.logger.debug("LOG:", e); } return queueState; }  void init(ITemplateSelector templateSelector, Integer numOfGeneratedMixes); @Override QueueState set(QueueState queueState);  }