}
private Checked serviceBindingMetadataTest(MetaValue metaValue)
{
assertTrue(metaValue instanceof CompositeValue);
CompositeValue bindingMetadata = (CompositeValue) metaValue;
Checked result = new Checked();
MetaValue val = bindingMetadata.get("fullyQualifiedName");
assertNotNull("property fullyQualifiedName has no value", val);
assertTrue("property fullyQualifiedName value is SimpleValue", val instanceof SimpleValue);
assertNotNull("property fullyQualifiedName value is not null", ((SimpleValue) val).getValue());
val = bindingMetadata.get("serviceName");
assertNotNull("property serviceName has no value", val);
assertTrue("property serviceName value is SimpleValue", val instanceof SimpleValue);
assertNotNull("property serviceName value is not null", ((SimpleValue) val).getValue());
val = bindingMetadata.get("bindingName");
if (val != null)
{
result.bindingName = true;
assertNotNull("property bindingName has no value", val);
assertTrue("property bindingName value is SimpleValue", val instanceof SimpleValue);
assertEquals("type of bindingName value isn't String", String.class.getName(), val.getMetaType().getClassName());
}
val = bindingMetadata.get("bindingSetName");
if (val != null)
{
assertNotNull("property bindingSetName has no value", val);
assertTrue("property bindingSetName value is SimpleValue", val instanceof SimpleValue);
assertEquals("type of bindingSetName value isn't String", String.class.getName(), val.getMetaType().getClassName());
}
val = bindingMetadata.get("hostName");
if (val != null)
{
result.hostname = true;
assertTrue("property hostName value is SimpleValue", val instanceof SimpleValue);
assertEquals("type of hostName value isn't String", String.class.getName(), val.getMetaType().getClassName());
}
val = bindingMetadata.get("port");
assertNotNull("property port has no value", val);
assertTrue("property port value is SimpleValue", val instanceof SimpleValue);
assertNotNull("property port value is not null", ((SimpleValue) val).getValue());
assertEquals("type of port value isn't int", int.class.getName(), val.getMetaType().getClassName());
assertNotNull("property port value is not null", ((SimpleValue) val).getValue());
val = bindingMetadata.get("description");
if (val != null)
{
result.hostname = true;
assertNotNull("property hostName has no value", val);
assertTrue("property description value is SimpleValue", val instanceof SimpleValue);
assertEquals("type of description value isn't String", String.class.getName(), val.getMetaType().getClassName());
}
val = bindingMetadata.get("fixedPort");
assertNotNull("property bindingName has no value", val);
assertTrue("property bindingName value is SimpleValue", val instanceof SimpleValue);
assertNotNull("property bindingName value is not null", ((SimpleValue) val).getValue());
assertEquals("type of bindingName value isn't boolean", boolean.class.getName(), val.getMetaType().getClassName());
assertNotNull("property bindingName value is not null", ((SimpleValue) val).getValue());
val = bindingMetadata.get("fixedHostName");
assertNotNull("property bindingName has no value", val);
assertTrue("property bindingName value is SimpleValue", val instanceof SimpleValue);
assertNotNull("property bindingName value is not null", ((SimpleValue) val).getValue());
assertEquals("type of bindingName value isn't boolean", boolean.class.getName(), val.getMetaType().getClassName());
assertNotNull("property bindingName value is not null", ((SimpleValue) val).getValue());