示例#1
0
        public async Task <IList <Guid> > MapAsync(int idToMap)
        {
            var tracksDuration = await _trackDurationService.GetAsync(idToMap);

            var matches = await _trackDurationMatcher.FindMatchesAsync(tracksDuration);

            return(matches);
        }
示例#2
0
        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);
        }
示例#3
0
        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);
        }