Ejemplo n.º 1
0
        public async Task MusicBrainzServiceGetArtistTestAsync()
        {
            var artistName = "Queen";

            var client = new RestClient("https://musicbrainz.org");

            var musicBrainzService = new MusicBrainzService(client, new NullLogger <MusicBrainzService>());

            Artist artist = await musicBrainzService.GetArtistByNameAsync(artistName);

            Assert.Equal(artistName, artist.Name);
            Assert.Equal("0383dadf-2a4e-4d10-a46a-e9e041da8eb3", artist.Id);
        }
Ejemplo n.º 2
0
        public async Task MusicBrainzServiceGetSongsTest()
        {
            var id = "0383dadf-2a4e-4d10-a46a-e9e041da8eb3";

            var client = new RestClient("https://musicbrainz.org");

            var musicBrainzService = new MusicBrainzService(client, new NullLogger <MusicBrainzService>());

            IEnumerable <Song> songs = await musicBrainzService.GetSongsByIdAsync(id);

            Assert.True(songs.Any());
            Assert.Contains(songs, o => !string.IsNullOrEmpty(o.Title));
        }
Ejemplo n.º 3
0
        public OnlineMetatagsForm()
        {
            InitializeComponent();

            _mbService = new MusicBrainzService();
        }