@Test public void shouldSetSnarePatternInCompositionTimeSlot(){ QueueState result = setSnarePatternAnalyticsEvent.set(queueState); List<ProgressionUnitBar> pBars = result.getStructure().get(0).getProgressionUnitBars(); assertThat(pBars.get(0).getCompositionTimeSlot().getSnarePatternId()).isEqualTo(1); assertThat(pBars.get(1).getCompositionTimeSlot().getSnarePatternId()).isEqualTo(2); assertThat(pBars.get(2).getCompositionTimeSlot().getSnarePatternId()).isEqualTo(1); assertThat(pBars.get(3).getCompositionTimeSlot().getSnarePatternId()).isEqualTo(2); }
@Override public QueueState set(QueueState queueState) { for(ProgressionUnit progressionUnit : queueState.getStructure()){ for(ProgressionUnitBar progressionUnitBar : progressionUnit.getProgressionUnitBars()){ progressionUnitBar.getCompositionTimeSlot().setSnarePatternId(progressionUnitBar.getSnarePattern().getId()); } } return queueState; }
SetSnarePatternAnalyticsEvent implements IEventChain { @Override public QueueState set(QueueState queueState) { for(ProgressionUnit progressionUnit : queueState.getStructure()){ for(ProgressionUnitBar progressionUnitBar : progressionUnit.getProgressionUnitBars()){ progressionUnitBar.getCompositionTimeSlot().setSnarePatternId(progressionUnitBar.getSnarePattern().getId()); } } return queueState; } }
SetSnarePatternAnalyticsEvent implements IEventChain { @Override public QueueState set(QueueState queueState) { for(ProgressionUnit progressionUnit : queueState.getStructure()){ for(ProgressionUnitBar progressionUnitBar : progressionUnit.getProgressionUnitBars()){ progressionUnitBar.getCompositionTimeSlot().setSnarePatternId(progressionUnitBar.getSnarePattern().getId()); } } return queueState; }  }
SetSnarePatternAnalyticsEvent implements IEventChain { @Override public QueueState set(QueueState queueState) { for(ProgressionUnit progressionUnit : queueState.getStructure()){ for(ProgressionUnitBar progressionUnitBar : progressionUnit.getProgressionUnitBars()){ progressionUnitBar.getCompositionTimeSlot().setSnarePatternId(progressionUnitBar.getSnarePattern().getId()); } } return queueState; }  @Override QueueState set(QueueState queueState); }
SetSnarePatternAnalyticsEvent implements IEventChain { @Override public QueueState set(QueueState queueState) { for(ProgressionUnit progressionUnit : queueState.getStructure()){ for(ProgressionUnitBar progressionUnitBar : progressionUnit.getProgressionUnitBars()){ progressionUnitBar.getCompositionTimeSlot().setSnarePatternId(progressionUnitBar.getSnarePattern().getId()); } } return queueState; }  @Override QueueState set(QueueState queueState);  }