Float floatValue = new Float("3.14");
Double doubleValue = new Double("3.14e12");
Date dateValue = createDate(2001, 1, 1);
BigDecimal bigDecimalValue = new BigDecimal("12e4");
BigInteger bigIntegerValue = new BigInteger("123456");
Alphabet enumValue = Alphabet.Z;
HashSet<PropertyMetaData> attributes = new HashSet<PropertyMetaData>();
attributes.add(new AbstractPropertyMetaData("AString", stringValue));
attributes.add(new AbstractPropertyMetaData("AByte", byteValue));
attributes.add(new AbstractPropertyMetaData("ABoolean", booleanValue));
attributes.add(new AbstractPropertyMetaData("ACharacter", characterValue));
attributes.add(new AbstractPropertyMetaData("AShort", shortValue));
attributes.add(new AbstractPropertyMetaData("anInt", integerValue));
attributes.add(new AbstractPropertyMetaData("ALong", longValue));
attributes.add(new AbstractPropertyMetaData("AFloat", floatValue));
attributes.add(new AbstractPropertyMetaData("ADouble", doubleValue));
attributes.add(new AbstractPropertyMetaData("ADate", dateValue));
attributes.add(new AbstractPropertyMetaData("ABigDecimal", bigDecimalValue));
attributes.add(new AbstractPropertyMetaData("ABigInteger", bigIntegerValue));
attributes.add(new AbstractPropertyMetaData("abyte", byteValue));
attributes.add(new AbstractPropertyMetaData("aboolean", booleanValue));
attributes.add(new AbstractPropertyMetaData("achar", characterValue));
attributes.add(new AbstractPropertyMetaData("ashort", shortValue));
attributes.add(new AbstractPropertyMetaData("anint", integerValue));
attributes.add(new AbstractPropertyMetaData("along", longValue));
attributes.add(new AbstractPropertyMetaData("afloat", floatValue));
attributes.add(new AbstractPropertyMetaData("adouble", doubleValue));
attributes.add(new AbstractPropertyMetaData("ANumber", longValue));
attributes.add(new AbstractPropertyMetaData("overloadedProperty", stringValue));
attributes.add(new AbstractPropertyMetaData("enumProperty", enumValue));
AbstractBeanMetaData metaData = new AbstractBeanMetaData(SimpleBean.class.getName());
metaData.setProperties(attributes);
Kernel kernel = bootstrap();
KernelConfigurator configurator = kernel.getConfigurator();
SimpleBean bean = (SimpleBean)instantiateAndConfigure(configurator, metaData);
assertEquals(stringValue, bean.getAString());
assertEquals(byteValue, bean.getAByte());
assertEquals(booleanValue, bean.getABoolean());
assertEquals(characterValue, bean.getACharacter());
assertEquals(shortValue, bean.getAShort());
assertEquals(integerValue, bean.getAnInt());
assertEquals(longValue, bean.getALong());
assertEquals(floatValue, bean.getAFloat());
assertEquals(doubleValue, bean.getADouble());
assertEquals(dateValue, bean.getADate());
assertEquals(bigDecimalValue, bean.getABigDecimal());
assertEquals(bigIntegerValue, bean.getABigInteger());
assertEquals(byteValue.byteValue(), bean.getAbyte());
assertEquals(booleanValue.booleanValue(), bean.isAboolean());
assertEquals(characterValue.charValue(), bean.getAchar());
assertEquals(shortValue.shortValue(), bean.getAshort());
assertEquals(integerValue.intValue(), bean.getAnint());
assertEquals(longValue.longValue(), bean.getAlong());
assertEquals(floatValue.floatValue(), bean.getAfloat());
assertEquals(doubleValue.doubleValue(), bean.getAdouble());
Number number = bean.getANumber();
assertEquals(Long.class, number.getClass());
assertEquals(longValue, number);
assertEquals(stringValue, bean.getOverloadedProperty());
Alphabet anenum = bean.getEnumProperty();
assertEquals(enumValue, anenum);
}