Package org.strecks.util.impl

Examples of org.strecks.util.impl.JavaBean


{

  @Test(expectedExceptions=ApplicationRuntimeException.class)
  public void testGetMethodWithArg() throws Exception
  {
    JavaBean bean = new JavaBean();
    assert null != ReflectHelper.getMethod(bean, "setBooleanProperty");
  }
View Full Code Here


  }

  @Test
  public void testGetNoArgMethod() throws Exception
  {
    JavaBean bean = new JavaBean();
    assert null != ReflectHelper.getMethod(bean, "isBooleanProperty");
  }
View Full Code Here

 
 
  @Test
  public void testGetBeanPropertyType()
  {
    JavaBean bean = new JavaBean();
    Class<?> beanPropertyType = ReflectHelper.getBeanPropertyType(bean, "booleanProperty");
    Assert.assertEquals(beanPropertyType, Boolean.TYPE);
  }
View Full Code Here

  }

  @Test
  public void testUnknownGetBeanPropertyType()
  {
    JavaBean bean = new JavaBean();
    try
    {
      ReflectHelper.getBeanPropertyType(bean, "unknownProperty");
    }
    catch (ApplicationRuntimeException e)
View Full Code Here

{

  @Test
  public void testPropertyValueGetter1() throws Exception
  {
    JavaBean bean = new JavaBean();
    bean.setStringProperty("stringval");
    bean.setBooleanProperty(true);

    Assert.assertEquals(PropertyValueGetter.getPropertyValue(bean, "stringProperty"), "stringval");
    Assert.assertEquals(PropertyValueGetter.getPropertyValue(bean, "booleanProperty"), true);
  }
View Full Code Here

  }

  @Test
  public void testPropertyValueGetterUnknown() throws Exception
  {
    JavaBean bean = new JavaBean();

    try
    {
      PropertyValueGetter.getPropertyValue(bean, "unknownProperty");
    }
View Full Code Here

  }

  @Test
  public void testGetPropertyDescriptor() throws Exception
  {
    JavaBean bean = new JavaBean();
    assert null != PropertyValueGetter.getPropertyDescriptor(bean, "stringProperty");
    assert null != PropertyValueGetter.getPropertyDescriptor(bean, "booleanProperty");

  }
View Full Code Here

  }

  @Test
  public void testPropertyDescriptorGetterUnknown() throws Exception
  {
    JavaBean bean = new JavaBean();

    try
    {
      PropertyValueGetter.getPropertyDescriptor(bean, "unknownProperty");
    }
View Full Code Here

  }

  @Test
  public void testGetSilentPropertyDescriptor() throws Exception
  {
    JavaBean bean = new JavaBean();
    assert null != PropertyValueGetter.getPropertyDescriptorSilently(bean, "stringProperty");
    assert null == PropertyValueGetter.getPropertyDescriptorSilently(bean, "unknownProperty");

  }
View Full Code Here

  }

  @Test
  public void testGetSilentPropertyClass() throws Exception
  {
    JavaBean bean = new JavaBean();
    assert null != PropertyValueGetter.getPropertyTypeSilently(bean, "stringProperty");
    assert null == PropertyValueGetter.getPropertyTypeSilently(bean, "unknownProperty");

  }
View Full Code Here

TOP

Related Classes of org.strecks.util.impl.JavaBean

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.