use of com.helger.phase4.model.pmode.leg.PModeLeg in project phase4 by phax.
the class PeppolCompatibilityValidatorTest method testValidatePModeProtocolSOAP11NotAllowed.
@Test
public void testValidatePModeProtocolSOAP11NotAllowed() {
m_aPMode.setLeg1(new PModeLeg(new PModeLegProtocol("https://test.com", ESoapVersion.SOAP_11), null, null, null, null));
VALIDATOR.validatePMode(m_aPMode, m_aErrorList);
assertTrue(m_aErrorList.containsAny(x -> x.getErrorText(LOCALE).contains("SoapVersion '1.1' is unsupported")));
}
use of com.helger.phase4.model.pmode.leg.PModeLeg in project phase4 by phax.
the class PeppolCompatibilityValidatorTest method testValidatePModeProtocolAddressIsNotHttp.
@Test
public void testValidatePModeProtocolAddressIsNotHttp() {
m_aPMode.setLeg1(new PModeLeg(PModeLegProtocol.createForDefaultSoapVersion("ftp://test.com"), null, null, null, null));
VALIDATOR.validatePMode(m_aPMode, m_aErrorList);
assertTrue(m_aErrorList.containsAny(x -> x.getErrorText(LOCALE).contains("AddressProtocol 'ftp' is unsupported")));
}
use of com.helger.phase4.model.pmode.leg.PModeLeg in project phase4 by phax.
the class PeppolCompatibilityValidatorTest method testValidatePModeSecurityPModeAuthorizeTrue.
@Test
public void testValidatePModeSecurityPModeAuthorizeTrue() {
final PModeLegSecurity aSecurityLeg = m_aPMode.getLeg1().getSecurity();
aSecurityLeg.setPModeAuthorize(true);
m_aPMode.setLeg1(new PModeLeg(PModeLegProtocol.createForDefaultSoapVersion("http://test.example.org"), null, null, null, aSecurityLeg));
VALIDATOR.validatePMode(m_aPMode, m_aErrorList);
assertTrue(m_aErrorList.containsAny(x -> x.getErrorText(LOCALE).contains("false")));
}
use of com.helger.phase4.model.pmode.leg.PModeLeg in project phase4 by phax.
the class PeppolCompatibilityValidatorTest method testValidatePModeErrorHandlingReportProcessErrorNotifyConsumerWrongValue.
@Test
public void testValidatePModeErrorHandlingReportProcessErrorNotifyConsumerWrongValue() {
final PModeLegErrorHandling aErrorHandler = PModeLegErrorHandling.createUndefined();
aErrorHandler.setReportProcessErrorNotifyConsumer(false);
m_aPMode.setLeg1(new PModeLeg(PModeLegProtocol.createForDefaultSoapVersion("http://test.example.org"), null, aErrorHandler, null, null));
VALIDATOR.validatePMode(m_aPMode, m_aErrorList);
assertTrue(m_aErrorList.containsAny(x -> x.getErrorText(LOCALE).contains("ErrorHandling.Report.ProcessErrorNotifyConsumer should be 'true'")));
}
use of com.helger.phase4.model.pmode.leg.PModeLeg in project phase4 by phax.
the class PeppolCompatibilityValidatorTest method testValidatePModeNoProtocolAddress.
@Test
@Ignore("The response address is most of the time not set")
public void testValidatePModeNoProtocolAddress() {
m_aPMode.setLeg1(new PModeLeg(PModeLegProtocol.createForDefaultSoapVersion(null), null, null, null, null));
VALIDATOR.validatePMode(m_aPMode, m_aErrorList);
assertTrue(m_aErrorList.containsAny(x -> x.getErrorText(LOCALE).contains("AddressProtocol is missing")));
}
Aggregations