コード例 #1
0
        public void Browse_displays_the_albums_in_a_genre()
        {
            var genre = new GenreVm();
            catalogFacade.Setup(x => x.FindGenreByName(It.IsAny<string>())).Returns(genre);

            var browseResult = (ViewResult) storeController.Browse("Rock");

            Assert.AreEqual(genre, browseResult.Model);
        }
コード例 #2
0
 static void AssertGenreVmMatchesGenre(Genre genre, GenreVm result)
 {
     Assert.That(genre.GenreId, Is.EqualTo(result.GenreId));
     Assert.That(genre.Name, Is.EqualTo(result.Name));
     Assert.That(genre.Description, Is.EqualTo(result.Description));
 }