public void testComponentCopyOf() throws Exception
{
IComponentSpecification cs = parseComponent("ComponentCopyOf.jwc");
IContainedComponent source = cs.getComponent("source");
IContainedComponent copy = cs.getComponent("copy");
IContainedComponent override = cs.getComponent("override");
assertEquals("Insert", source.getType());
assertEquals("Insert", copy.getType());
assertEquals("Insert", override.getType());
IBindingSpecification b = source.getBinding("value");
assertEquals(BindingType.PREFIXED, b.getType());
assertEquals("ognl:date", b.getValue());
assertSame(b, copy.getBinding("value"));
IBindingSpecification b2 = override.getBinding("value");
assertEquals("ognl:tomorrow", b2.getValue());
b = copy.getBinding("foo");
assertSame(b, override.getBinding("foo"));
b = copy.getBinding("formatter");
assertSame(b, override.getBinding("formatter"));
}