@Test
public void testMethodCompare() throws Exception {
final MethodComparator comp = new MethodComparator();
boolean result = comp.equivalent( "evaluate",
new ClassReader( getClassData( MethodCompareA.class ) ),
"evaluate",
new ClassReader( getClassData( MethodCompareB.class ) ) );
assertEquals( true,
result );
result = comp.equivalent( "evaluate",
new ClassReader( getClassData( MethodCompareA.class ) ),
"evaluate2",
new ClassReader( getClassData( MethodCompareA.class ) ) );
assertEquals( false,
result );
result = comp.equivalent( "evaluate",
new ClassReader( getClassData( MethodCompareB.class ) ),
"evaluate2",
new ClassReader( getClassData( MethodCompareA.class ) ) );
assertEquals( false,
result );
result = comp.equivalent( "evaluate",
new ClassReader( getClassData( MethodCompareB.class ) ),
"evaluate",
new ClassReader( getClassData( MethodCompareA.class ) ) );
assertEquals( true,
result );
result = comp.equivalent( "evaluate",
new ClassReader( getClassData( MethodCompareA.class ) ),
"evaluate",
new ClassReader( getClassData( MethodCompareA.class ) ) );
assertEquals( true,
result );
result = comp.equivalent( "evaluate",
new ClassReader( getClassData( MethodCompareA.class ) ),
"askew",
new ClassReader( getClassData( MethodCompareA.class ) ) );
assertEquals( false,
result );
}