コード例 #1
0
 @Test
 public void testGetSetValue() throws InvalidPropertyOperationException, PropertyException {
   component.setIntProperty(0);
   Property property = getIntProperty();
   assertEquals(0, property.getValue());
   property.setValue(1);
   assertEquals(1, property.getValue());
   assertEquals(1, component.getIntProperty());
 }
コード例 #2
0
 private XMLBasedGetterSetterProperty getIntProperty() throws PropertyException {
   XMLBasedGetterSetterMetaProperty metaProperty =
       new XMLBasedGetterSetterMetaProperty(
           "intProperty",
           int.class,
           component.getIntPropertyGetter(),
           component.getIntPropertySetter());
   return new XMLBasedGetterSetterProperty(metaProperty, component);
 }
コード例 #3
0
 @Before
 public void setUp() throws Exception {
   component = new AdvancedExampleComponent();
   _propertiesObject =
       new XMLBasedPropertyContainer(
           XMLBasedPropertyProvider.getInstance().getMetaPropertiesSet(component.getClass()),
           component);
 }
コード例 #4
0
 private XMLBasedFieldProperty getFloatProperty() throws PropertyException {
   XMLBasedFieldMetaProperty metaProperty =
       new XMLBasedFieldMetaProperty("floatProperty", component.getFloatPropertyField());
   return new XMLBasedFieldProperty(metaProperty, component);
 }