testRejectsGetValueModelWithDifferentAccessors() Verifies that the BeanAdapter rejects attempts to get an adapting
ValueModel by means of #getValueModel with different
property accessor names.
public void testCanGetModelWhileListeningToBeanChange()(Code)
Sets up an environment that has thrown a ConcurrentModificationException
in older releases. Basically, in a situation where the BeanAdapter
iterates over all its internal property adapters, we add a new adapter
and check if this fails.
testCanGetModelWhileListeningToMulticastChange
public void testCanGetModelWhileListeningToMulticastChange()(Code)
public void testRejectsGetValueModelWithDifferentAccessors()(Code)
Verifies that the BeanAdapter rejects attempts to get an adapting
ValueModel by means of #getValueModel with different
property accessor names. In other words, for each bean property
API users must use either
BeanAdapter.getValueModel(String) or
BeanAdapter.getValueModel(StringStringString) , not both.
And all calls to the latter method must use the same getter and setter
names for the same property name.
This test invokes both methods for the same property name with different
getter and/or setter names and expects that the second call is rejected.
The BeanAdapter is created without a bean set, to avoid that the
BeanAdapter checks for a valid property.
testSetAdapterValueSendsUpdates
public void testSetAdapterValueSendsUpdates()(Code)
Checks that #setBean changes the bean and moves the
PropertyChangeListeners to the new bean.
testSetBeanChangesReadWriteState
public void testSetBeanChangesReadWriteState()(Code)
Tests that we can change the read/write state of the bean.
testSetBeanOnWriteOnlyProperty
public void testSetBeanOnWriteOnlyProperty()(Code)
Tests that we can change the bean if we adapt a write-only property.
Changing the bean normally calls the property's getter to request
the old value that is used in the fired PropertyChangeEvent.