public void remove_post() { var controller = new SystemController(_repository); _repository.Add(new Domain.Entities.System() { SystemId = 1, Name = "App 1" }); _repository.Add(new Domain.Entities.System() { SystemId = 2, Name = "App 2" }); var result = controller.DeleteConfirmed(1); result.Should().BeRedirectToRouteResult().WithAction("Index").WithController("System"); _repository.All.Should().HaveCount(1); }