binding.setName(name2);
binding.setInterfaceName(name1QN);
BindingOperationElement bindingOperation = binding.addBindingOperationElement();
bindingOperation.setRef(name3QN);
BindingMessageReferenceElement bindingMessageReference = bindingOperation.addBindingMessageReferenceElement();
bindingMessageReference.setMessageLabel(MessageLabel.IN);
if(!val.testAssertionBindingMessageReference1052(descEl.toComponent().getBindings()[0].getBindingOperations()[0].getBindingMessageReferences(), reporter))
{
fail("The testAssertionBindingMessageReference1052 method returned false with one valid binding message reference defined.");
}
}
catch(WSDLException e)
{
fail("There was a problem running the test assertion method " + e);
}
// Test that the assertion returns true when there are two binding message references defined with
// unique interface message references.
try
{
DescriptionElement descEl = factory.newDescription();
descEl.setTargetNamespace(namespace1);
InterfaceElement interfac = descEl.addInterfaceElement();
interfac.setName(name1);
InterfaceOperationElement interfaceOperation = interfac.addInterfaceOperationElement();
interfaceOperation.setName(name3);
InterfaceMessageReferenceElement interfaceMessageReference = interfaceOperation.addInterfaceMessageReferenceElement();
interfaceMessageReference.setMessageLabel(MessageLabel.IN);
InterfaceMessageReferenceElement interfaceMessageReference2 = interfaceOperation.addInterfaceMessageReferenceElement();
interfaceMessageReference2.setMessageLabel(MessageLabel.OUT);
BindingElement binding = descEl.addBindingElement();
binding.setName(name2);
binding.setInterfaceName(name1QN);
BindingOperationElement bindingOperation = binding.addBindingOperationElement();
bindingOperation.setRef(name3QN);
BindingMessageReferenceElement bindingMessageReference = bindingOperation.addBindingMessageReferenceElement();
bindingMessageReference.setMessageLabel(MessageLabel.IN);
BindingMessageReferenceElement bindingMessageReference2 = bindingOperation.addBindingMessageReferenceElement();
bindingMessageReference2.setMessageLabel(MessageLabel.OUT);
if(!val.testAssertionBindingMessageReference1052(descEl.toComponent().getBindings()[0].getBindingOperations()[0].getBindingMessageReferences(), reporter))
{
fail("The testAssertionBindingMessageReference1052 method returned false with two valid binding message references defined.");
}
}
catch(WSDLException e)
{
fail("There was a problem running the test assertion method " + e);
}
// Test that the assertion returns false when there are two binding message references define with
// the same interface message reference.
try
{
DescriptionElement descEl = factory.newDescription();
descEl.setTargetNamespace(namespace1);
InterfaceElement interfac = descEl.addInterfaceElement();
interfac.setName(name1);
InterfaceOperationElement interfaceOperation = interfac.addInterfaceOperationElement();
interfaceOperation.setName(name3);
InterfaceMessageReferenceElement interfaceMessageReference = interfaceOperation.addInterfaceMessageReferenceElement();
interfaceMessageReference.setMessageLabel(MessageLabel.IN);
BindingElement binding = descEl.addBindingElement();
binding.setName(name2);
binding.setInterfaceName(name1QN);
BindingOperationElement bindingOperation = binding.addBindingOperationElement();
bindingOperation.setRef(name3QN);
BindingMessageReferenceElement bindingMessageReference = bindingOperation.addBindingMessageReferenceElement();
bindingMessageReference.setMessageLabel(MessageLabel.IN);
BindingMessageReferenceElement bindingMessageReference2 = bindingOperation.addBindingMessageReferenceElement();
bindingMessageReference2.setMessageLabel(MessageLabel.IN);
if(val.testAssertionBindingMessageReference1052(descEl.toComponent().getBindings()[0].getBindingOperations()[0].getBindingMessageReferences(), reporter))
{
fail("The testAssertionBindingMessageReference1052 method returned true with two binding message references defined with the same interface message reference.");
}