コード例 #1
0
        public void Can_Create_Song()
        {
            var expectedId    = 2;
            var expectedModel = new Song();

            repo.GetByID(expectedId).Returns(expectedModel);

            var result = underTest.Details(expectedId);
            var model  = (Song)result.Model;

            Assert.Equal(expectedModel, model);
        }
コード例 #2
0
        public ViewResult Details(int id)
        {
            var model = songRepo.GetByID(id);

            return(View(model));
        }