@Test public void testAddMultipleChildsIntoNot() { final GroupElement not = GroupElementFactory.newNotInstance(); final Pattern pattern1 = new Pattern( 0, null ); try { not.addChild( pattern1 ); } catch ( final RuntimeException rde ) { fail( "Adding a single child is not supposed to throw Exception for NOT GE: " + rde.getMessage() ); } final Pattern pattern2 = new Pattern( 0, null ); try { not.addChild( pattern2 ); fail( "Adding a second child into a NOT GE should throw Exception" ); } catch ( final RuntimeException rde ) { // everything is fine } }
"b" ); final GroupElement parent = GroupElementFactory.newNotInstance(); final GroupElement or = GroupElementFactory.newOrInstance(); parent.addChild( or );
"b" ); final GroupElement not = GroupElementFactory.newNotInstance(); final GroupElement exists = GroupElementFactory.newExistsInstance(); final GroupElement and = GroupElementFactory.newAndInstance();
parent.addChild( or2 ); final GroupElement not = GroupElementFactory.newNotInstance(); not.addChild( f ); parent.addChild( not );
and1.addChild( and2 ); and2.addChild( b ); final GroupElement not1 = GroupElementFactory.newNotInstance(); final GroupElement not2 = GroupElementFactory.newNotInstance(); not1.addChild( not2 ); not2.addChild( c ); or1.addChild( exist1 ); final GroupElement not3 = GroupElementFactory.newNotInstance(); not3.addChild( i );
final GroupElement not1 = GroupElementFactory.newNotInstance(); not1.addChild( f ); final GroupElement or3 = GroupElementFactory.newOrInstance(); or3.addChild( g ); final GroupElement not2 = GroupElementFactory.newNotInstance(); not2.addChild( h ); or3.addChild( not2 );
or.addChild( and2 ); final GroupElement not = GroupElementFactory.newNotInstance(); and.addChild( not ); final GroupElement or2 = GroupElementFactory.newOrInstance();