Пример #1
0
        public async Task GetArtistShouldReturnArtistMashup()
        {
            var response = await _controller.Get("Artist id");

            var okResult = Assert.IsType <OkObjectResult>(response);
            var mashup   = Assert.IsType <MashupArtist>(okResult.Value);

            Assert.Equal("Artist name", mashup.Name);
            Assert.Equal("Album name", mashup.Albums.First().Title);
        }
Пример #2
0
        public async Task GetMashupForQueenShouldReturnQueen()
        {
            var response = await _controller.Get("0383dadf-2a4e-4d10-a46a-e9e041da8eb3");

            var okResult = Assert.IsType <OkObjectResult>(response);
            var mashup   = Assert.IsType <MashupArtist>(okResult.Value);

            Assert.Equal("Queen", mashup.Name);
            Assert.Equal(25, mashup.Albums.Count);
            Assert.Contains("<p><b>Queen</b> are a British rock band that formed in London in 1970.", mashup.Description);
        }