public void GetFtpExports_FileFormatXls_ExportSettingAllUdfs_NoException() { // Arrange InitilizeGetFtpExportsTests(FileFormatXls, String.Empty, ExportSettingAllUdfs); var constructedBody = String.Empty; var report = new TestFtpExportsReport(null, constructedBody, _reportSchedule, DateTime.Today); // Act var returnResult = report.Execute(); // Assert returnResult.ShouldNotBeNull(); returnResult.success.ShouldBeTrue(); report.Body.ShouldContain(SuccessfulResultStringGetFtpExports); _anyException.ShouldBeFalse(); }
public void GetFtpExports_FileFormatTxt_AllSubscribeTypeCode_NoException() { // Arrange InitilizeGetFtpExportsTests(FileFormatTxt, ValueTextCharStar, String.Empty); var constructedBody = String.Empty; var report = new TestFtpExportsReport(null, constructedBody, _reportSchedule, DateTime.Today); // Act var returnResult = report.Execute(); // Assert returnResult.ShouldNotBeNull(); returnResult.success.ShouldBeTrue(); report.Body.ShouldContain(SuccessfulResultStringGetFtpExports); _anyException.ShouldBeFalse(); }
public void GetFtpExports_FileFormatDefault_NoData() { // Arrange InitilizeGetFtpExportsTests(String.Empty, String.Empty, String.Empty); ECN_Framework_BusinessLayer.Activity.View.Fakes.ShimBlastActivity. DownloadBlastReportDetails_NoAccessCheckInt32Int32BooleanStringStringStringStringStringStringStringBoolean = (x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11) => new DataTable(); var constructedBody = String.Empty; var report = new TestFtpExportsReport(null, constructedBody, _reportSchedule, DateTime.Today); // Act var returnResult = report.Execute(); // Assert returnResult.ShouldNotBeNull(); returnResult.success.ShouldBeFalse(); report.Body.ShouldContain(NoRecordStringGetFtpExports); }
public void GetFtpExports_FileFormatDefault_NoReportParameterException() { // Arrange InitilizeGetFtpExportsTests(String.Empty, String.Empty, String.Empty); _reportSchedule = new ECN_Framework_Entities.Communicator.Fakes.ShimReportSchedule { ReportParametersGet = () => throw new Exception(ExceptionNoReportScheduleParameters) }; var constructedBody = String.Empty; var report = new TestFtpExportsReport(null, constructedBody, _reportSchedule, DateTime.Today); // Act var returnResult = report.Execute(); // Assert returnResult.ShouldNotBeNull(); returnResult.success.ShouldBeFalse(); report.Body.ShouldContain(FailureResultStringGetFtpExports); _anyException.ShouldBeTrue(); _exceptionMessage.ShouldBe(ExceptionNoReportScheduleParameters); }
public void GetFtpExports_FileFormatDefault_FTPException() { // Arrange InitilizeGetFtpExportsTests(String.Empty, String.Empty, String.Empty); ShimWebRequest.CreateString = (p) => { throw new Exception(ExceptionMessageFTP); }; var constructedBody = String.Empty; var report = new TestFtpExportsReport(null, constructedBody, _reportSchedule, DateTime.Today); // Act var returnResult = report.Execute(); // Assert returnResult.ShouldNotBeNull(); returnResult.success.ShouldBeFalse(); report.Body.ShouldContain(ConnectionFailureResultStringGetFtpExports); _anyException.ShouldBeTrue(); _exceptionMessage.ShouldBe(ExceptionMessageFTP); }