Condition wrappedCondition = conditionWrapper.getCondition(); if(wrappedCondition == null)
@Test public void containsWrapper() { ConditionWrapper conditionWrapper = new Not(); assertTrue(Conditions.contains(conditionWrapper, null)); assertTrue(Conditions.contains(conditionWrapper, conditionWrapper)); ConditionWrapper otherWrapper=new Not(); assertTrue(Conditions.contains(conditionWrapper, otherWrapper)); otherWrapper.setCondition(BooleanValues.TRUE); assertFalse(Conditions.contains(conditionWrapper, otherWrapper)); conditionWrapper.setCondition(BooleanValues.TRUE); assertFalse(Conditions.contains(conditionWrapper, null)); assertTrue(Conditions.contains(conditionWrapper, conditionWrapper)); assertTrue(Conditions.contains(conditionWrapper, BooleanValues.TRUE)); assertFalse(Conditions.contains(conditionWrapper, BooleanValues.FALSE)); }
Condition wrappedCondition = conditionWrapper.getCondition(); if(wrappedCondition == null)
public void internalTestEquals(Condition original, Condition other) { assertEquals(original, other); if(other instanceof ConditionGroup) { ConditionGroup originalGroup = (ConditionGroup) original; ConditionGroup clonedGroup = (ConditionGroup) other; assertEquals(originalGroup.getConditions(), clonedGroup.getConditions()); } else if(other instanceof ConditionWrapper) { ConditionWrapper originalWrapper = (ConditionWrapper) original; ConditionWrapper clonedWrapper = (ConditionWrapper) other; assertEquals(originalWrapper.getCondition(), clonedWrapper.getCondition()); } } }