@Test public void testgetResultIteratorwithnull() { Constraint myconstraint1 = createMock(Constraint.class); Constraint myconstraint2 = createMock(Constraint.class); TableAdapter table = createMock(TableAdapter.class); Or myor = new Or(myconstraint1, myconstraint2); boolean exceptionSiteIsMeaningful = false; try { myor.getResultIterator(); } catch (NullPointerException e) { if (e.getMessage().contains(myconstraint1.toString())) { exceptionSiteIsMeaningful = true; } } assertTrue("Exception site should be meaninful", exceptionSiteIsMeaningful); }
@Override public String toString() { return new StringBuilder().append("Or(").append(super.toString()) .append(")").toString(); }
Or extends Logic { @Override public String toString() { return new StringBuilder().append("Or(").append(super.toString()) .append(")").toString(); } }
Or extends Logic { @Override public String toString() { return new StringBuilder().append("Or(").append(super.toString()) .append(")").toString(); } Or();  Or(Constraint... subConstraints);  Or(List<Constraint> asList); }
Or extends Logic { @Override public String toString() { return new StringBuilder().append("Or(").append(super.toString()) .append(")").toString(); } Or();  Or(Constraint... subConstraints);  Or(List<Constraint> asList); @Override String toString(); @Override boolean equals(Object a); @Override int hashCode(); }
Or extends Logic { @Override public String toString() { return new StringBuilder().append("Or(").append(super.toString()) .append(")").toString(); } Or();  Or(Constraint... subConstraints);  Or(List<Constraint> asList); @Override String toString(); @Override boolean equals(Object a); @Override int hashCode();  }