示例#1
0
        public void AddCartModelTest()
        {
            var       cardRepoMock       = new Mock <ICartRepo>();
            var       cartMangerMock     = new CartManager(cardRepoMock.Object);
            var       cartControllerMock = new CartController(cartMangerMock);
            CartModel cartModel          = new CartModel()
            {
                CartId = 6,
                BookId = 6,
                Count  = 6
            };
            var result = cartControllerMock.AddCartModel(cartModel);

            Assert.NotNull(result);
        }