use of org.apache.aries.blueprint.reflect.BeanMetadataImpl in project geronimo-xbean by apache.
the class SoupUsingBlueprintTest method testSoup.
public void testSoup() throws Exception {
BeanMetadataImpl soup = (BeanMetadataImpl) reg.getComponentDefinition("soupService");
BeanMetadataImpl nestedBean = (BeanMetadataImpl) reg.getComponentDefinition("nestedBean");
BeanMetadataImpl nestedValue = (BeanMetadataImpl) reg.getComponentDefinition("nestedValue");
asssertValidSoup(soup);
asssertValidSoup(nestedBean);
asssertValidSoup(nestedValue);
// reg.;
// assertFalse(soup.exists());
// assertFalse(nestedBean.exists());
// assertFalse(nestedValue.exists());
}
use of org.apache.aries.blueprint.reflect.BeanMetadataImpl in project geronimo-xbean by apache.
the class PizzaUsingXBeanWinBeanRefTest method testPizza.
public void testPizza() throws Exception {
BeanMetadataImpl meta = (BeanMetadataImpl) reg.getComponentDefinition("pizzaService");
BeanProperty p = propertyByName("topping", meta);
assertTrue(p.getValue() instanceof RefMetadataImpl);
assertEquals("topping", ((RefMetadataImpl) p.getValue()).getComponentId());
checkPropertyValue("cheese", "#Edam", meta);
checkPropertyValue("size", "17", meta);
}
use of org.apache.aries.blueprint.reflect.BeanMetadataImpl in project geronimo-xbean by apache.
the class RecipeUsingBlueprintTest method testRecipes.
public void testRecipes() throws Exception {
BeanMetadataImpl svc = (BeanMetadataImpl) reg.getComponentDefinition("recipeService");
List<Metadata> list = ((CollectionMetadataImpl) propertyByName("recipes", svc).getValue()).getValues();
assertNotNull(list);
assertEquals(2, list.size());
BeanMetadataImpl r = (BeanMetadataImpl) list.get(0);
checkPropertyValue("ingredients", "Food", r);
checkPropertyValue("instructions", "Mash together", r);
r = (BeanMetadataImpl) list.get(1);
checkPropertyValue("ingredients", "Food", r);
checkPropertyValue("instructions", "Mash together", r);
BeanMetadataImpl topRecipe = (BeanMetadataImpl) propertyByName("topRecipe", svc).getValue();
assertNotNull(topRecipe);
checkPropertyValue("ingredients", "Food", topRecipe);
}
use of org.apache.aries.blueprint.reflect.BeanMetadataImpl in project geronimo-xbean by apache.
the class ComponentTest method test.
protected void test(String file) throws Exception {
ComponentDefinitionRegistry f = BlueprintTestSupport.parse(file).getComponentDefinitionRegistry();
BeanMetadataImpl meta = (BeanMetadataImpl) f.getComponentDefinition("container");
assertNotNull(meta);
CollectionMetadata list = (CollectionMetadata) BlueprintTestSupport.propertyByName("beans", meta).getValue();
assertEquals(1, list.getValues().size());
assertEquals(InnerBean.class.getName(), ((BeanMetadata) list.getValues().get(0)).getClassName());
}
use of org.apache.aries.blueprint.reflect.BeanMetadataImpl in project geronimo-xbean by apache.
the class PizzaUsingBlueprintTest method testPizza.
public void testPizza() throws Exception {
BeanMetadataImpl meta = (BeanMetadataImpl) reg.getComponentDefinition("pizzaService");
// pizza.makePizza();
checkPropertyValue("topping", "Salami", meta);
checkPropertyValue("cheese", "Edam", meta);
checkPropertyValue("size", "17", meta);
}
Aggregations