org.sourceforge.jemm.weaver.transformation
Class AbstractClassTransformationTest

java.lang.Object
  extended by org.sourceforge.jemm.weaver.transformation.AbstractClassTransformationTest

public class AbstractClassTransformationTest
extends java.lang.Object

Confirms the behaviour of the default equals and hashcode methods of AbstractClassTransformation. Equals should return true when the class is the same (but with different instances), and hashcode should be consistent with that.

Author:
Paul Keeble

Constructor Summary
AbstractClassTransformationTest()
           
 
Method Summary
 void consistentHashcode()
          Test that two identical transformers have consistent hashcodes (x.hashCode() == y.hashCode())
 void equalsEqual()
          Test that two identical transformers have x.equals(y) and y.equals(x)
 void equalsNotEqual()
          That that two different transformers are not equal using .equals().
 void inconsistentHashcode()
          That that two different transformers have different hashcodes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractClassTransformationTest

public AbstractClassTransformationTest()
Method Detail

equalsEqual

public void equalsEqual()
                 throws java.lang.Exception
Test that two identical transformers have x.equals(y) and y.equals(x)

Throws:
java.lang.Exception - On Error.

equalsNotEqual

public void equalsNotEqual()
                    throws java.lang.Exception
That that two different transformers are not equal using .equals().

Throws:
java.lang.Exception - On test failure.

consistentHashcode

public void consistentHashcode()
                        throws java.lang.Exception
Test that two identical transformers have consistent hashcodes (x.hashCode() == y.hashCode())

Throws:
java.lang.Exception - On Error.

inconsistentHashcode

public void inconsistentHashcode()
                          throws java.lang.Exception
That that two different transformers have different hashcodes.

Throws:
java.lang.Exception - On test failure.


Copyright © 2009. All Rights Reserved.