public async Task <IList <Guid> > MapAsync(int idToMap) { var tracksDuration = await _trackDurationService.GetAsync(idToMap); var matches = await _trackDurationMatcher.FindMatchesAsync(tracksDuration); return(matches); }
public void CreateMapper() { _trackDurationService = Substitute.For <ITrackDurationService <int> >(); _trackDurationService.GetAsync(Arg.Any <int>()) .Returns(Task.FromResult(_trackDurations)); _trackDurationMatcher = Substitute.For <ITrackDurationMatcher <Guid> >(); _trackDurationMatcher.FindMatchesAsync(Arg.Any <IList <int> >()) .Returns(Task.FromResult((IList <Guid>) new List <Guid>())); _mapper = new SevenDigitalToMusicBrainzMapper(_trackDurationService, _trackDurationMatcher); }
public void CreateMapper() { _trackDurationService = Substitute.For<ITrackDurationService<int>>(); _trackDurationService.GetAsync(Arg.Any<int>()) .Returns(Task.FromResult(_trackDurations)); _trackDurationMatcher = Substitute.For<ITrackDurationMatcher<Guid>>(); _trackDurationMatcher.FindMatchesAsync(Arg.Any<IList<int>>()) .Returns(Task.FromResult((IList<Guid>) new List<Guid>())); _mapper = new SevenDigitalToMusicBrainzMapper(_trackDurationService, _trackDurationMatcher); }