@Test public void shouldGenerateCorrectTrackInfoList(){ List<MetaDataTrackInfo> trackInfos = setMetaDataState.getMetaDataTrackInfo(queueState); assertThat(trackInfos).hasSize(7); List<String> trackTypes = new ArrayList<>(); trackTypes.add("comphats"); trackTypes.add("comphi"); trackTypes.add("compkick"); trackTypes.add("complow"); trackTypes.add("compmelodic"); trackTypes.add("compmid"); trackTypes.add("compsnare"); for(MetaDataTrackInfo trackInfo : trackInfos){ assertThat(trackInfo.getTrackId()).isEqualToIgnoringCase(queueState.getQueueItem().getQueueItemId()); assertThat(trackTypes.contains(trackInfo.getTrackType())).isTrue(); assertThat(trackInfo.getVersion()).isEqualToIgnoringCase("2.1"); } }
public List<MetaDataTrackInfo> getMetaDataTrackInfo(QueueState queueState){ List<String> trackTypes = new ArrayList<>(); trackTypes.add("comphats"); trackTypes.add("comphi"); trackTypes.add("compkick"); trackTypes.add("complow"); trackTypes.add("compmelodic"); trackTypes.add("compmid"); trackTypes.add("compsnare"); List<MetaDataTrackInfo> trackInfoList = new ArrayList<>(); for(String type : trackTypes){ MetaDataTrackInfo metaDataTrackInfo = new MetaDataTrackInfo(); metaDataTrackInfo.setTrackId(queueState.getQueueItem().getQueueItemId()); metaDataTrackInfo.setTrackType(type); metaDataTrackInfo.setVersion(API_VERSION); trackInfoList.add(metaDataTrackInfo); } return trackInfoList; }
SetMetaDataStateEvent implements IEventChain { public List<MetaDataTrackInfo> getMetaDataTrackInfo(QueueState queueState){ List<String> trackTypes = new ArrayList<>(); trackTypes.add("comphats"); trackTypes.add("comphi"); trackTypes.add("compkick"); trackTypes.add("complow"); trackTypes.add("compmelodic"); trackTypes.add("compmid"); trackTypes.add("compsnare"); List<MetaDataTrackInfo> trackInfoList = new ArrayList<>(); for(String type : trackTypes){ MetaDataTrackInfo metaDataTrackInfo = new MetaDataTrackInfo(); metaDataTrackInfo.setTrackId(queueState.getQueueItem().getQueueItemId()); metaDataTrackInfo.setTrackType(type); metaDataTrackInfo.setVersion(API_VERSION); trackInfoList.add(metaDataTrackInfo); } return trackInfoList; } }
SetMetaDataStateEvent implements IEventChain { public List<MetaDataTrackInfo> getMetaDataTrackInfo(QueueState queueState){ List<String> trackTypes = new ArrayList<>(); trackTypes.add("comphats"); trackTypes.add("comphi"); trackTypes.add("compkick"); trackTypes.add("complow"); trackTypes.add("compmelodic"); trackTypes.add("compmid"); trackTypes.add("compsnare"); List<MetaDataTrackInfo> trackInfoList = new ArrayList<>(); for(String type : trackTypes){ MetaDataTrackInfo metaDataTrackInfo = new MetaDataTrackInfo(); metaDataTrackInfo.setTrackId(queueState.getQueueItem().getQueueItemId()); metaDataTrackInfo.setTrackType(type); metaDataTrackInfo.setVersion(API_VERSION); trackInfoList.add(metaDataTrackInfo); } return trackInfoList; } @Autowired  SetMetaDataStateEvent(IMetaDataChordInfoDal metaDataChordInfoDal, IMetaDataTrackInfoDal metaDataTrackInfoDal, @Value("${api.version}") String api_version); }
SetMetaDataStateEvent implements IEventChain { public List<MetaDataTrackInfo> getMetaDataTrackInfo(QueueState queueState){ List<String> trackTypes = new ArrayList<>(); trackTypes.add("comphats"); trackTypes.add("comphi"); trackTypes.add("compkick"); trackTypes.add("complow"); trackTypes.add("compmelodic"); trackTypes.add("compmid"); trackTypes.add("compsnare"); List<MetaDataTrackInfo> trackInfoList = new ArrayList<>(); for(String type : trackTypes){ MetaDataTrackInfo metaDataTrackInfo = new MetaDataTrackInfo(); metaDataTrackInfo.setTrackId(queueState.getQueueItem().getQueueItemId()); metaDataTrackInfo.setTrackType(type); metaDataTrackInfo.setVersion(API_VERSION); trackInfoList.add(metaDataTrackInfo); } return trackInfoList; } @Autowired  SetMetaDataStateEvent(IMetaDataChordInfoDal metaDataChordInfoDal, IMetaDataTrackInfoDal metaDataTrackInfoDal, @Value("${api.version}") String api_version); @Override QueueState set(QueueState queueState); List<MetaDataTrackInfo> getMetaDataTrackInfo(QueueState queueState); List<MetaDataChordInfo> getMetaDataChordInfo(QueueState queueState); }
SetMetaDataStateEvent implements IEventChain { public List<MetaDataTrackInfo> getMetaDataTrackInfo(QueueState queueState){ List<String> trackTypes = new ArrayList<>(); trackTypes.add("comphats"); trackTypes.add("comphi"); trackTypes.add("compkick"); trackTypes.add("complow"); trackTypes.add("compmelodic"); trackTypes.add("compmid"); trackTypes.add("compsnare"); List<MetaDataTrackInfo> trackInfoList = new ArrayList<>(); for(String type : trackTypes){ MetaDataTrackInfo metaDataTrackInfo = new MetaDataTrackInfo(); metaDataTrackInfo.setTrackId(queueState.getQueueItem().getQueueItemId()); metaDataTrackInfo.setTrackType(type); metaDataTrackInfo.setVersion(API_VERSION); trackInfoList.add(metaDataTrackInfo); } return trackInfoList; } @Autowired  SetMetaDataStateEvent(IMetaDataChordInfoDal metaDataChordInfoDal, IMetaDataTrackInfoDal metaDataTrackInfoDal, @Value("${api.version}") String api_version); @Override QueueState set(QueueState queueState); List<MetaDataTrackInfo> getMetaDataTrackInfo(QueueState queueState); List<MetaDataChordInfo> getMetaDataChordInfo(QueueState queueState);  }