public void Edit_ReturnsNotEmptyView() { service.Get <StateView>(state.Id).Returns(state); Object expected = NotEmptyView(controller, state); Object actual = controller.Edit(state.Id); Assert.Same(expected, actual); }
public async Task EditGetAction_UpdateModelFromService() { // Arrange // Act var result = await validController.Edit(entity.Id); // Assert mock.Verify(a => a.GetAsync(entity.Id, true)); }
public async Task EditPostAction_ModelError_ReturnsSameModel() { // Arrange // Act var result = await notValidController.Edit(entity.Id, entity) as ViewResult; // Assert Assert.Equal(entity, result.Model); }