コード例 #1
0
        public void Wholesaler_WholesalerEdit_ReturnsWholesalerServiceUpdate()
        {
            var viewModel = new WholesalerEditModel()
            {
                Wholesaler = new WholesalerDto()
                {
                    Name = "Test"
                }
            };

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

            _wholesalerService.Received().Update(viewModel.Wholesaler);
        }
コード例 #2
0
        public void WholesalerController_GetEditViewModel_DbSetReceivedFind()
        {
            _wholesalersController.Edit(11);

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