Morphing Objects is as easy as calling
. You may have noticed that
does not have a
morph() method but
ObjectMorpher does, that is because
Morpher is used on primitive Morphers too.
EZMorph comes with a handy class for working with
It works much like
on commons-beanutils. This class is not a singleton
so it is possible to have multiple registries with
different Morphers that support the same target
class, but take different default values or support
different source classes.
Another convenient class is
you can register standard Morphers to any
MorpherRegistry with it.
Asserting array equality is very easy with
ArrayAssertions, just call
on it, and will try to see first if the arrays reffer to the same
location in memory, if not, it will compare them by value, iterating
through each dimension the arrays may have.
Here are the meat and bones of every
assertEquals( Object, Object ) is different, as it will inspect
the arrays for primitive contents and call the appropriate method.