Examples of EagerFailingCallback


Examples of org.pentaho.platform.util.beans.BeanUtil.EagerFailingCallback

  @Test( expected = IllegalAccessException.class )
  public void testSetValueNonExistentProperty() throws Exception {

    TestAction action1 = new TestAction();
    ActionHarness harness1 = new ActionHarness( action1 );
    harness1.setValue( "THISPROPERTYDOESNOTEXIST", "", new EagerFailingCallback() );

    Assert.assertEquals( "test message action1", harness1.getValue( "message" ) );
  }
View Full Code Here

Examples of org.pentaho.platform.util.beans.BeanUtil.EagerFailingCallback

    // commons bBeanutils will throw exception if you try to type convert a null value. Pentaho BeanUtil
    // will skip the set operation altogether if you try to set a null value on a bean. This test ensures
    // that no exception is thrown in this case. The correct behavior is a message will be logged indicating
    // that the null value could not be set. I don't consider this a "real" type conversion problem like
    // a text string failing conversion to a Long type.. this type of conversion will still fail.
    harness1.setValue( "count", null, new EagerFailingCallback() );
    // If no exception thrown, then the test is essentially passed. We'll double check that
    // count was not set as well.
    Assert.assertNull( "count property should remain null since null set value ops should be skipped", action1
        .getCount() );
  }
View Full Code Here

Examples of org.pentaho.platform.util.beans.BeanUtil.EagerFailingCallback

  @Test( expected = Exception.class )
  public void testSetValueFailedConvertWitNonNullValue() throws Exception {

    TestAction action1 = new TestAction();
    ActionHarness harness1 = new ActionHarness( action1 );
    harness1.setValue( "count", new CustomParamType(), new EagerFailingCallback() );
  }
View Full Code Here

Examples of org.pentaho.platform.util.beans.BeanUtil.EagerFailingCallback

      public String format( String name ) {
        return "message";
      }
    };

    harness1.setValue( "THISWILLGETCLOBBERED", "test message action1", new EagerFailingCallback(), f );

    Assert.assertEquals( "test message action1", harness1.getValue( "message" ) );
  }
View Full Code Here

Examples of org.pentaho.platform.util.beans.BeanUtil.EagerFailingCallback

      public String format( String name ) {
        return "THISPROPERTYDOESNOTEXIST";
      }
    };

    harness1.setValue( "THISWILLGETCLOBBERED", "test message action1", new EagerFailingCallback(), f );
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.