コード例 #1
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);
        }
コード例 #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 SevenDigitalToMusicBrainzMapper(ITrackDurationService<int> trackDurationService, ITrackDurationMatcher<Guid> trackDurationMatcher)
 {
     _trackDurationService = trackDurationService;
     _trackDurationMatcher = trackDurationMatcher;
 }
コード例 #4
0
 public SevenDigitalToMusicBrainzMapper(ITrackDurationService <int> trackDurationService, ITrackDurationMatcher <Guid> trackDurationMatcher)
 {
     _trackDurationService = trackDurationService;
     _trackDurationMatcher = trackDurationMatcher;
 }