EveryExpr extends AbstractExpression { public EveryExpr(final XmlNodeReadOnlyTrx rtx, final List<Axis> mVars, final Axis mSatisfy) { super(rtx); this.mVars = mVars; this.mSatisfy = mSatisfy; } EveryExpr(final XmlNodeReadOnlyTrx rtx, final List<Axis> mVars, final Axis mSatisfy); @Override void reset(final long mNodeKey); @Override void evaluate();  }
@Test public void testEveryExpr() throws SirixException { final AbstractAxis axis1 = new XPathAxis(holder.getXmlNodeReadTrx(), "every $child in child::node()" + "satisfies $child/@i"); assertEquals(true, axis1.hasNext()); axis1.next(); assertEquals(true, Boolean.parseBoolean(holder.getXmlNodeReadTrx().getValue())); assertEquals(false, axis1.hasNext()); final AbstractAxis axis2 = new XPathAxis(holder.getXmlNodeReadTrx(), "every $child in child::node()" + "satisfies $child/@abc"); assertEquals(true, axis2.hasNext()); axis2.next(); assertEquals(false, Boolean.parseBoolean(holder.getXmlNodeReadTrx().getValue())); assertEquals(false, axis2.hasNext()); holder.getXmlNodeReadTrx().moveTo(1L); final AbstractAxis axis3 = new XPathAxis(holder.getXmlNodeReadTrx(), "every $child in child::element()" + " satisfies $child/attribute::attribute()"); assertEquals(true, axis3.hasNext()); axis3.next(); assertEquals(false, Boolean.parseBoolean(holder.getXmlNodeReadTrx().getValue())); assertEquals(false, axis3.hasNext()); holder.getXmlNodeReadTrx().moveTo(1L); final AbstractAxis axis4 = new XPathAxis(holder.getXmlNodeReadTrx(), "every $child in child::element() satisfies $child/child::c"); assertEquals(true, axis4.hasNext()); axis4.next(); assertEquals(true, Boolean.parseBoolean(holder.getXmlNodeReadTrx().getValue())); assertEquals(false, axis4.hasNext()); }