public void CreatePartial() { // Arrange var service = Substitute.For <INewsRepository>(); var mapper = Substitute.For <IMapper>(); var controller = new NewsController(service, mapper); // Act var result = controller.CreatePartial() as PartialViewResult; var viewName = result.ViewName; var model = result.Model; // Assert Assert.That(result, !Is.Null); Assert.That("_CreatePartial", Is.EqualTo(viewName)); Assert.That(model, Is.Null); }