public void DirectoryController_TableTest_ExistPath_ReturnedCorrectView() { mockFileService.Setup(a => a.IsExistPath(It.IsAny <string>())).Returns(true); var result = controller.Table("D\\New") as PartialViewResult; Assert.IsNotNull(result); Assert.AreEqual("Table", result.ViewName); }