public void Export_DownloadQnA() { IExportService <QnAMakerSetting> exportService = new ExportServiceImpl <QnAMakerSetting>(); var controller = new ListingController(queryService.Object, exportService); var result = controller.ExportQnAMaker(string.Empty, AppDomain.CurrentDomain.BaseDirectory); Assert.IsNotNull(result); Assert.IsInstanceOfType(result, typeof(FileResult)); var fileResult = result as FileResult; Assert.IsTrue(fileResult.ContentType == "application/text"); }