use of com.helger.phase4.model.pmode.leg.PModeLeg in project phase4 by phax.
the class CEFCompatibilityValidatorTest 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 CEFCompatibilityValidatorTest method testValidatePModeSecurityWrongX509SignatureAlgorithm.
@Test
public void testValidatePModeSecurityWrongX509SignatureAlgorithm() {
final PModeLegSecurity aSecurityLeg = m_aPMode.getLeg1().getSecurity();
aSecurityLeg.setX509SignatureAlgorithm(ECryptoAlgorithmSign.RSA_SHA_384);
assertNotSame(ECryptoAlgorithmSign.RSA_SHA_256, aSecurityLeg.getX509SignatureAlgorithm());
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(ECryptoAlgorithmSign.RSA_SHA_256.getID())));
}
use of com.helger.phase4.model.pmode.leg.PModeLeg in project phase4 by phax.
the class CEFCompatibilityValidatorTest method testValidatePModeErrorHandlingReportAsResponseMandatory.
@Test
public void testValidatePModeErrorHandlingReportAsResponseMandatory() {
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.AsResponse is missing")));
}
use of com.helger.phase4.model.pmode.leg.PModeLeg in project phase4 by phax.
the class CEFCompatibilityValidatorTest method testValidatePModeSecurityWrongWSSVersion.
@SuppressWarnings("deprecation")
@Test
public void testValidatePModeSecurityWrongWSSVersion() {
final PModeLegSecurity aSecurityLeg = m_aPMode.getLeg1().getSecurity();
aSecurityLeg.setWSSVersion(EWSSVersion.WSS_10);
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("Security.WSSVersion must use the value WSS_111 instead of WSS_10")));
}
use of com.helger.phase4.model.pmode.leg.PModeLeg in project phase4 by phax.
the class CEFCompatibilityValidatorTest method testValidatePModeErrorHandlingReportProcessErrorNotifyConsumerMandatory.
@Test
public void testValidatePModeErrorHandlingReportProcessErrorNotifyConsumerMandatory() {
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.ProcessErrorNotifyConsumer is missing")));
}
Aggregations