@Test
public void getPropertyInfo()
{
{
PropertyInfo pi=PropertyInfo.getPropertyInfo(String.class);
Assert.assertNotNull(pi);
Assert.assertNull( pi.getSubPropertyInfos() );
}
{
PropertyInfo pi=PropertyInfo.getPropertyInfo(java.util.Date.class);
Assert.assertNotNull(pi.getSubPropertyInfo("date").getReadMethod());
Assert.assertNotNull(pi.getSubPropertyInfo("hours").getReadMethod());
Assert.assertNotNull(pi.getSubPropertyInfo("minutes").getReadMethod());
Assert.assertNotNull(pi.getSubPropertyInfo("month").getReadMethod());
Assert.assertNotNull(pi.getSubPropertyInfo("seconds").getReadMethod());
Assert.assertNotNull(pi.getSubPropertyInfo("time").getReadMethod());
Assert.assertNotNull(pi.getSubPropertyInfo("year").getReadMethod());
}
{
PropertyInfo pi=PropertyInfo.getPropertyInfo(int.class);
Assert.assertNotNull(pi);
Assert.assertNull( pi.getSubPropertyInfos() );
}
{
PropertyInfo pi=PropertyInfo.getPropertyInfo(MyBean.class);
Assert.assertNotNull(pi);
Assert.assertNotNull(pi.getSubPropertyInfo("integer").getWriteMethod());
PropertyInfo p0=pi.getSubPropertyInfo("myBean");
Assert.assertNotNull(p0.getReadMethod());
Assert.assertNotNull(p0.getSubPropertyInfo("myBean").getReadMethod());
}
{
PropertyInfo pi=PropertyInfo.getPropertyInfo(MyBean2.class);
Assert.assertNotNull(pi);
Assert.assertNotNull(pi.getSubPropertyInfo("list").getReadMethod());
PropertyInfo p0=pi.getSubPropertyInfo("myBean");
Assert.assertNotNull(p0.getReadMethod());
Assert.assertNotNull(p0.getSubPropertyInfo("myBean").getReadMethod());
}
{
PropertyInfo pi=PropertyInfo.getPropertyInfo(int[].class);
Assert.assertNotNull(pi);
Assert.assertNull( pi.getSubPropertyInfos() );
}
{
PropertyInfo pi=PropertyInfo.getPropertyInfo(MyBean[].class);
Assert.assertNotNull(pi);
Assert.assertNull( pi.getSubPropertyInfos() );
}
{
PropertyInfo pi=PropertyInfo.getPropertyInfo(MyBean2[].class);
Assert.assertNotNull(pi);
Assert.assertNull( pi.getSubPropertyInfos() );
}
}