use of com.axelor.apps.bankpayment.xsd.sepa.pain_008_001_01.Document in project sscs-evidence-share by hmcts.
the class SendLetterServiceConsumerTest method buildLetter.
private LetterV3 buildLetter() throws IOException, URISyntaxException {
Path pdfPath = Paths.get(ClassLoader.getSystemResource("files/myPdf.pdf").toURI());
byte[] pdf = Files.readAllBytes(pdfPath);
String response = Base64.getEncoder().encodeToString(pdf);
Map<String, Object> additionalData = new HashMap<>();
additionalData.put(ADDITIONAL_DATA_CASE_REFERENCE, "123421323");
return new LetterV3(XEROX_TYPE_PARAMETER, Arrays.asList(new Document(response, 2)), additionalData);
}
use of com.axelor.apps.bankpayment.xsd.sepa.pain_008_001_01.Document in project maven-release by apache.
the class JDomBuildTest method testGetPlugins.
@Test
public void testGetPlugins() throws Exception {
String content = "<build></build>";
Document document = builder.build(new StringReader(content));
assertNotNull(new JDomBuild(document.getRootElement()).getPlugins());
assertEquals(0, new JDomBuild(document.getRootElement()).getPlugins().size());
content = "<build><plugins/></build>";
document = builder.build(new StringReader(content));
assertEquals(0, new JDomBuild(document.getRootElement()).getPlugins().size());
content = "<build><plugins><plugin/></plugins></build>";
document = builder.build(new StringReader(content));
assertEquals(1, new JDomBuild(document.getRootElement()).getPlugins().size());
}
use of com.axelor.apps.bankpayment.xsd.sepa.pain_008_001_01.Document in project maven-release by apache.
the class JDomDependencyManagementTest method testGetDependencies.
@Test
public void testGetDependencies() throws Exception {
String content = "<dependencyManamgement></dependencyManamgement>";
Document document = builder.build(new StringReader(content));
assertNotNull(new JDomDependencyManagement(document.getRootElement()).getDependencies());
assertEquals(0, new JDomDependencyManagement(document.getRootElement()).getDependencies().size());
content = "<dependencyManamgement><dependencies/></dependencyManamgement>";
document = builder.build(new StringReader(content));
assertEquals(0, new JDomDependencyManagement(document.getRootElement()).getDependencies().size());
content = "<dependencyManamgement><dependencies><dependency/></dependencies></dependencyManamgement>";
document = builder.build(new StringReader(content));
assertEquals(1, new JDomDependencyManagement(document.getRootElement()).getDependencies().size());
}
use of com.axelor.apps.bankpayment.xsd.sepa.pain_008_001_01.Document in project maven-release by apache.
the class JDomModelTest method testSetScm.
@Test
public void testSetScm() throws Exception {
String content = "<project></project>";
Document document = builder.build(new StringReader(content));
Model model = new JDomModel(document);
assertNull(model.getScm());
model.setScm(new Scm());
assertNotNull(model.getScm());
model.setScm(null);
assertNull(model.getScm());
}
use of com.axelor.apps.bankpayment.xsd.sepa.pain_008_001_01.Document in project maven-release by apache.
the class JDomModelTest method testGetScm.
@Test
public void testGetScm() throws Exception {
String content = "<project></project>";
Document document = builder.build(new StringReader(content));
assertNull(new JDomModel(document).getScm());
}
Aggregations