@Test public void shouldSetHatPatternInCompositionTimeSlot(){ QueueState result = setHatPatternAnalyticsEvent.set(queueState); List<ProgressionUnitBar> pBars = result.getStructure().get(0).getProgressionUnitBars(); assertThat(pBars.get(0).getCompositionTimeSlot().getHatPatternId()).isEqualTo(1); assertThat(pBars.get(1).getCompositionTimeSlot().getHatPatternId()).isEqualTo(2); assertThat(pBars.get(2).getCompositionTimeSlot().getHatPatternId()).isEqualTo(1); assertThat(pBars.get(3).getCompositionTimeSlot().getHatPatternId()).isEqualTo(2); }
@Override public QueueState set(QueueState queueState) { for(ProgressionUnit progressionUnit : queueState.getStructure()){ for(ProgressionUnitBar progressionUnitBar : progressionUnit.getProgressionUnitBars()){ progressionUnitBar.getCompositionTimeSlot().setHatPatternId(progressionUnitBar.getHatPattern().getId()); } } return queueState; }
SetHatPatternAnalyticsEvent implements IEventChain { @Override public QueueState set(QueueState queueState) { for(ProgressionUnit progressionUnit : queueState.getStructure()){ for(ProgressionUnitBar progressionUnitBar : progressionUnit.getProgressionUnitBars()){ progressionUnitBar.getCompositionTimeSlot().setHatPatternId(progressionUnitBar.getHatPattern().getId()); } } return queueState; } }
SetHatPatternAnalyticsEvent implements IEventChain { @Override public QueueState set(QueueState queueState) { for(ProgressionUnit progressionUnit : queueState.getStructure()){ for(ProgressionUnitBar progressionUnitBar : progressionUnit.getProgressionUnitBars()){ progressionUnitBar.getCompositionTimeSlot().setHatPatternId(progressionUnitBar.getHatPattern().getId()); } } return queueState; }  }
SetHatPatternAnalyticsEvent implements IEventChain { @Override public QueueState set(QueueState queueState) { for(ProgressionUnit progressionUnit : queueState.getStructure()){ for(ProgressionUnitBar progressionUnitBar : progressionUnit.getProgressionUnitBars()){ progressionUnitBar.getCompositionTimeSlot().setHatPatternId(progressionUnitBar.getHatPattern().getId()); } } return queueState; }  @Override QueueState set(QueueState queueState); }
SetHatPatternAnalyticsEvent implements IEventChain { @Override public QueueState set(QueueState queueState) { for(ProgressionUnit progressionUnit : queueState.getStructure()){ for(ProgressionUnitBar progressionUnitBar : progressionUnit.getProgressionUnitBars()){ progressionUnitBar.getCompositionTimeSlot().setHatPatternId(progressionUnitBar.getHatPattern().getId()); } } return queueState; }  @Override QueueState set(QueueState queueState);  }