public void Initialize()
 {
     artistInfoClient        = new Mock <IArtistInfoClient>();
     artistDescriptionClient = new Mock <IArtistDescriptionClient>();
     albumCoverArtClient     = new Mock <IAlbumCoverArtClient>();
     target = new MusicBrainzDataAggregator(artistInfoClient.Object,
                                            artistDescriptionClient.Object,
                                            albumCoverArtClient.Object);
 }
 public void Initialize()
 {
     artistInfoClient = new Mock<IArtistInfoClient>();
     artistDescriptionClient = new Mock<IArtistDescriptionClient>();
     albumCoverArtClient = new Mock<IAlbumCoverArtClient>();
     target = new MusicBrainzDataAggregator(artistInfoClient.Object,
         artistDescriptionClient.Object,
         albumCoverArtClient.Object);
 }
        public async Task TestMusicBrainzDataAggregator()
        {
            IArtistInfoAggregator artistInfoProvider = new MusicBrainzDataAggregator(new MusicBrainzClient(),
                                                                                     new WikipediaArtistInfoClient(),
                                                                                     new CoverArtArchiveClient());

            var watch = Stopwatch.StartNew();

            foreach (var testEntity in TestTable)
            {
                var result = await artistInfoProvider.GetArtistInfoAsync(Guid.Parse(testEntity.Key));

                Assert.AreEqual(testEntity.Value, result.Name);
            }
            watch.Stop();
            Console.WriteLine(string.Format("Execution time {0} ms", watch.ElapsedMilliseconds / TestTable.Count()));
        }