final PackageBuilder builder1 = new PackageBuilder();
final PackageDescr packageDescr1 = new PackageDescr( "package1" );
createEvalRule( packageDescr1,
"1==1" );
builder1.addPackage( packageDescr1 );
final EvalCondition eval1 = (EvalCondition) builder1.getPackage().getRules()[0].getLhs().getChildren().get( 0 );
final PackageBuilder builder2 = new PackageBuilder();
final PackageDescr packageDescr2 = new PackageDescr( "package2" );
createEvalRule( packageDescr2,
"1==1" );
builder2.addPackage( packageDescr2 );
final EvalCondition eval2 = (EvalCondition) builder2.getPackage().getRules()[0].getLhs().getChildren().get( 0 );
final PackageBuilder builder3 = new PackageBuilder();
final PackageDescr packageDescr3 = new PackageDescr( "package3" );
createEvalRule( packageDescr3,
"1==3" );
builder3.addPackage( packageDescr3 );
final EvalCondition eval3 = (EvalCondition) builder3.getPackage().getRules()[0].getLhs().getChildren().get( 0 );
assertEquals( eval1,
eval2 );
assertFalse( eval1.equals( eval3 ) );
assertFalse( eval2.equals( eval3 ) );