示例#1
0
        public void Inventory_InventoryEdit_ReturnsInventoryServiceUpdate()
        {
            var viewModel = new InventoryEditModel()
            {
                Inventory = new InventoryDto()
                {
                    Name = "Test"
                }
            };

            var result = _controller.Edit(viewModel) as RedirectToRouteResult;

            _service.Received().Update(viewModel.Inventory);
        }
示例#2
0
        public void TestEdit()
        {
            InventoriesController obj = new InventoriesController();
            var result = obj.Edit(2) as PartialViewResult;

            Assert.AreEqual("_edit", result.ViewName);
        }
示例#3
0
        public void InventoriesController_GetEditViewModel_DbSetReceivedFind()
        {
            _inventoriesController.Edit(11);

            _dbSet.Received(1).Find(11);
        }