public async Task ExportJson_RedirectToIndex() { Mock <BusinessTripService> mock = new Mock <BusinessTripService>(); BusinessTripController controller = GetNewBusinessTripControllerWithControllerContext(mock.Object, null); FilePathResult result = (await controller.ExportJson()) as FilePathResult; Assert.AreEqual("application/json", result.ContentType); Assert.AreEqual("BusinessTrips.json", result.FileDownloadName); Assert.AreEqual("./DiplomMSSQLApp.WEB/Results/BusinessTrips.json", result.FileName); }