public async Task DeleteGetActionWithId2_ReturnsModelFromService()
        {
            // Arrange

            // Act
            var result = await validController.Delete(entity.Id) as ViewResult;

            // Assert
            Assert.Equal(entity, result.Model);
        }
Beispiel #2
0
        public void Delete_ReturnsNotEmptyView()
        {
            service.Get <StateView>(state.Id).Returns(state);

            Object expected = NotEmptyView(controller, state);
            Object actual   = controller.Delete(state.Id);

            Assert.Same(expected, actual);
        }