assertEquals(SimpleValueSupport.wrap("java.lang.String"), cvalue.get("type"));
}
public void testKernelDeployment()
{
AbstractManagedObjectFactory mof = new AbstractManagedObjectFactory();
BeanMetaDataICF icf = new BeanMetaDataICF();
icf.setDelegateICF(new DefaultInstanceClassFactory(mof));
mof.setInstanceClassFactory(IBeanMetaData.class, icf);
testMOF = mof;
AKernelDeployment ad = new AKernelDeployment();
ABeanMetaData bean1 = new ABeanMetaData();
bean1.setBean(Simple.class.getName());
bean1.setName("SimpleBean#1");
ABeanMetaData bean2 = new ABeanMetaData();
bean2.setBean(Simple.class.getName());
bean2.setName("SimpleBean#2");
ABeanMetaData bean3 = new ABeanMetaData();
bean3.setBean(SimpleUnannotated.class.getName());
bean3.setName("SimpleUnannotated#3");
APropertyMetaData bean3P1 = new APropertyMetaData();
bean3P1.setName("properties");
bean3P1.setDescription("The bean properties");
bean3P1.setPropertyType("java.util.Set<IPropertyMetaData>");
bean3.addProperty(bean3P1);
Simple simple1 = new Simple();
simple1.setBigDecimalValue(new BigDecimal(123456));
Simple simple2 = new Simple();
simple2.setBigDecimalValue(new BigDecimal(222222));
SimpleUnannotated simple3 = new SimpleUnannotated();
simple3.setBigDecimalValue(new BigDecimal(333333));
// Setup the bean name mappings
BeanMetaDataICF.setBean("SimpleBean#1", simple1);
BeanMetaDataICF.setBean("SimpleBean#2", simple2);
BeanMetaDataICF.setBean("SimpleUnannotated#3", simple3);
List<IBeanMetaDataFactory> beanFactories = new ArrayList<IBeanMetaDataFactory>();
beanFactories.add(bean1);
beanFactories.add(bean2);
beanFactories.add(bean3);
ad.setBeanFactories(beanFactories);
ManagedObject mo = mof.initManagedObject(ad, "KernelDeployment", null);
ManagedProperty beanFactoriesMP = mo.getProperty("beanFactories");
assertNotNull("beanFactories MP", beanFactoriesMP);
Object beanFactoriesMPValue = beanFactoriesMP.getValue();
getLog().debug("beanFactories MP value: "+beanFactoriesMPValue);
assertTrue(beanFactoriesMPValue instanceof CollectionValue);