use of com.helger.phase4.model.pmode.leg.PModeLegErrorHandling 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.PModeLegErrorHandling 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")));
}
use of com.helger.phase4.model.pmode.leg.PModeLegErrorHandling in project phase4 by phax.
the class CEFCompatibilityValidatorTest method testValidatePModeErrorHandlingReportDeliveryFailuresNotifyProducerWrongValue.
@Test
public void testValidatePModeErrorHandlingReportDeliveryFailuresNotifyProducerWrongValue() {
final PModeLegErrorHandling aErrorHandler = PModeLegErrorHandling.createUndefined();
aErrorHandler.setReportProcessErrorNotifyProducer(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.ProcessErrorNotifyProducer should be 'true'")));
}
use of com.helger.phase4.model.pmode.leg.PModeLegErrorHandling in project phase4 by phax.
the class CEFCompatibilityValidatorTwoWayFuncTest method testValidatePModeErrorHandlingReportAsResponseMandatory.
@Test
public void testValidatePModeErrorHandlingReportAsResponseMandatory() {
final PModeLegErrorHandling aErrorHandler = PModeLegErrorHandling.createUndefined();
m_aPMode.setLeg2(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.PModeLegErrorHandling in project phase4 by phax.
the class CEFCompatibilityValidatorTwoWayFuncTest method testValidatePModeErrorHandlingReportAsResponseWrongValue.
@Test
public void testValidatePModeErrorHandlingReportAsResponseWrongValue() {
final PModeLegErrorHandling aErrorHandler = PModeLegErrorHandling.createUndefined();
aErrorHandler.setReportAsResponse(false);
m_aPMode.setLeg2(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 must be 'true'")));
}
Aggregations