use of com.helger.phase4.model.pmode.leg.PModeLeg in project phase4 by phax.
the class CEFCompatibilityValidatorTest method testValidatePModeNoProtocol.
@Test
public void testValidatePModeNoProtocol() {
m_aPMode.setLeg1(new PModeLeg(null, null, null, null, null));
VALIDATOR.validatePMode(m_aPMode, m_aErrorList);
assertTrue(m_aErrorList.containsAny(x -> x.getErrorText(LOCALE).contains("Protocol is missing")));
}
use of com.helger.phase4.model.pmode.leg.PModeLeg in project phase4 by phax.
the class CEFCompatibilityValidatorTest method testValidatePModeErrorHandlingMandatory.
// Error Handling
@Test
public void testValidatePModeErrorHandlingMandatory() {
m_aPMode.setLeg1(new PModeLeg(PModeLegProtocol.createForDefaultSoapVersion("http://test.example.org"), null, null, null, null));
VALIDATOR.validatePMode(m_aPMode, m_aErrorList);
assertTrue(m_aErrorList.containsAny(x -> x.getErrorText(LOCALE).contains("PMode.Leg[1].ErrorHandling is missing")));
}
use of com.helger.phase4.model.pmode.leg.PModeLeg in project phase4 by phax.
the class CEFCompatibilityValidatorTest method testValidatePModeSecurityWrongX509SignatureHashFunction.
@Test
public void testValidatePModeSecurityWrongX509SignatureHashFunction() {
final PModeLegSecurity aSecurityLeg = m_aPMode.getLeg1().getSecurity();
aSecurityLeg.setX509SignatureHashFunction(ECryptoAlgorithmSignDigest.DIGEST_SHA_512);
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(ECryptoAlgorithmSignDigest.DIGEST_SHA_256.getID())));
}
use of com.helger.phase4.model.pmode.leg.PModeLeg in project phase4 by phax.
the class CEFCompatibilityValidatorTest method testValidatePModeErrorHandlingReportDeliveryFailuresNotifyProducerMandatory.
@Test
public void testValidatePModeErrorHandlingReportDeliveryFailuresNotifyProducerMandatory() {
final PModeLegErrorHandling aErrorHandler = PModeLegErrorHandling.createUndefined();
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.ProcessErrorNotifyProducer is missing")));
}
use of com.helger.phase4.model.pmode.leg.PModeLeg in project phase4 by phax.
the class CEFCompatibilityValidatorTwoWayFuncTest method testValidatePModeNoProtocolAddress.
@Test
@Ignore("The response address is most of the time not set")
public void testValidatePModeNoProtocolAddress() {
m_aPMode.setLeg2(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