Long id = ( Long ) getter.get( DOM );
assertEquals( "Not equals", new Long( 456 ), id );
}
public void testCompanyElementGeneration() throws Throwable {
Setter idSetter = PropertyAccessorFactory.getPropertyAccessor( generateIdProperty(), EntityMode.DOM4J )
.getSetter( null, null );
Setter nameSetter = PropertyAccessorFactory.getPropertyAccessor( generateNameProperty(), EntityMode.DOM4J )
.getSetter( null, null );
Setter textSetter = PropertyAccessorFactory.getPropertyAccessor( generateTextProperty(), EntityMode.DOM4J )
.getSetter( null, null );
Setter accountIdSetter = PropertyAccessorFactory.getPropertyAccessor(
generateAccountIdProperty(), EntityMode.DOM4J
)
.getSetter( null, null );
Element root = generateRootTestElement();
idSetter.set( root, new Long( 123 ), getSFI() );
textSetter.set( root, "description...", getSFI() );
nameSetter.set( root, "JBoss", getSFI() );
accountIdSetter.set( root, new Long( 456 ), getSFI() );
assertTrue( "DOMs not equal", new NodeComparator().compare( DOM, root ) == 0 );
}