@Test public void detailedReportWithNullValidationProcess() { ee.openeid.siva.validation.document.report.ValidationConclusion validationConclusion = createMockedValidationConclusion(); DetailedReport detailedReport = new DetailedReport(validationConclusion, null); ValidationReport responseValidationReport = transformer.toSoapResponse(detailedReport); assertValidationConclusion(validationConclusion, responseValidationReport.getValidationConclusion()); assertNull(responseValidationReport.getValidationProcess()); assertNull(responseValidationReport.getDiagnosticData()); }
public ValidationReport toSoapResponse(SimpleReport report) { ValidationReport validationReport = new ValidationReport(); ValidationConclusion responseValidationConclusion = toSoapValidationConclusion(report.getValidationConclusion()); validationReport.setValidationConclusion(responseValidationConclusion); if (report instanceof DetailedReport) { XmlDetailedReport xmlDetailedReport = ((DetailedReport) report).getValidationProcess(); validationReport.setValidationProcess(DETAILED_REPORT_TRANSFORMER.transform(xmlDetailedReport)); } else if (report instanceof DiagnosticReport) { XmlDiagnosticData diagnosticData = ((DiagnosticReport) report).getDiagnosticData(); validationReport.setDiagnosticData(DIAGNOSTIC_DATA_TRANSFORMER.transform(diagnosticData)); } return validationReport; }
ValidationReportSoapResponseTransformer { public ValidationReport toSoapResponse(SimpleReport report) { ValidationReport validationReport = new ValidationReport(); ValidationConclusion responseValidationConclusion = toSoapValidationConclusion(report.getValidationConclusion()); validationReport.setValidationConclusion(responseValidationConclusion); if (report instanceof DetailedReport) { XmlDetailedReport xmlDetailedReport = ((DetailedReport) report).getValidationProcess(); validationReport.setValidationProcess(DETAILED_REPORT_TRANSFORMER.transform(xmlDetailedReport)); } else if (report instanceof DiagnosticReport) { XmlDiagnosticData diagnosticData = ((DiagnosticReport) report).getDiagnosticData(); validationReport.setDiagnosticData(DIAGNOSTIC_DATA_TRANSFORMER.transform(diagnosticData)); } return validationReport; } }
ValidationReportSoapResponseTransformer { public ValidationReport toSoapResponse(SimpleReport report) { ValidationReport validationReport = new ValidationReport(); ValidationConclusion responseValidationConclusion = toSoapValidationConclusion(report.getValidationConclusion()); validationReport.setValidationConclusion(responseValidationConclusion); if (report instanceof DetailedReport) { XmlDetailedReport xmlDetailedReport = ((DetailedReport) report).getValidationProcess(); validationReport.setValidationProcess(DETAILED_REPORT_TRANSFORMER.transform(xmlDetailedReport)); } else if (report instanceof DiagnosticReport) { XmlDiagnosticData diagnosticData = ((DiagnosticReport) report).getDiagnosticData(); validationReport.setDiagnosticData(DIAGNOSTIC_DATA_TRANSFORMER.transform(diagnosticData)); } return validationReport; }  }
ValidationReportSoapResponseTransformer { public ValidationReport toSoapResponse(SimpleReport report) { ValidationReport validationReport = new ValidationReport(); ValidationConclusion responseValidationConclusion = toSoapValidationConclusion(report.getValidationConclusion()); validationReport.setValidationConclusion(responseValidationConclusion); if (report instanceof DetailedReport) { XmlDetailedReport xmlDetailedReport = ((DetailedReport) report).getValidationProcess(); validationReport.setValidationProcess(DETAILED_REPORT_TRANSFORMER.transform(xmlDetailedReport)); } else if (report instanceof DiagnosticReport) { XmlDiagnosticData diagnosticData = ((DiagnosticReport) report).getDiagnosticData(); validationReport.setDiagnosticData(DIAGNOSTIC_DATA_TRANSFORMER.transform(diagnosticData)); } return validationReport; }  ValidationReport toSoapResponse(SimpleReport report); }
ValidationReportSoapResponseTransformer { public ValidationReport toSoapResponse(SimpleReport report) { ValidationReport validationReport = new ValidationReport(); ValidationConclusion responseValidationConclusion = toSoapValidationConclusion(report.getValidationConclusion()); validationReport.setValidationConclusion(responseValidationConclusion); if (report instanceof DetailedReport) { XmlDetailedReport xmlDetailedReport = ((DetailedReport) report).getValidationProcess(); validationReport.setValidationProcess(DETAILED_REPORT_TRANSFORMER.transform(xmlDetailedReport)); } else if (report instanceof DiagnosticReport) { XmlDiagnosticData diagnosticData = ((DiagnosticReport) report).getDiagnosticData(); validationReport.setDiagnosticData(DIAGNOSTIC_DATA_TRANSFORMER.transform(diagnosticData)); } return validationReport; }  ValidationReport toSoapResponse(SimpleReport report);  }