Beispiel #1
0
        public void ReturnsAnInstanceWhenParameterIsNotNull()
        {
            // Arrange
            var comicServiceMock = new Mock <IComicService>();

            // Act
            var shoppingCartController = new ComicShop.Web.Controllers.ShoppingCartController(comicServiceMock.Object);

            // Assert
            Assert.IsNotNull(shoppingCartController);
        }
Beispiel #2
0
        public void ReturnView()
        {
            // Arrange
            var comicServiceMock = new Mock <IComicService>();

            // Act
            var shoppingCartController = new ComicShop.Web.Controllers.ShoppingCartController(comicServiceMock.Object);

            //Assert
            shoppingCartController
            .WithCallTo(c => c.Index())
            .ShouldRenderDefaultView();
        }