public void testAndExpressionWithBooleanArguments() {
/* When one is true and one is false. They should not be
* equal.
*/
//HashMap map = new HashMap();
propertySensor1=new BooleanConstant(true);
propertySensor2=new BooleanConstant(true);
propertySensor3=new BooleanConstant(true);
propertySensor4=new BooleanConstant(true);
propertySensor5=new BooleanConstant(true);
propertySensor6=new BooleanConstant(false);
propertySensor7=new BooleanConstant(false);
propertySensor8=new BooleanConstant(false);
propertySensor9=new BooleanConstant(false);
propertySensor10=new BooleanConstant(false);
//SensorLookup lookup = new SensorLookupImpl(map);
try {
//true
Vector v = new Vector();
v.add(propertySensor1);
v.add(propertySensor2);
Expression expression1 = new LogicalAnd(v,true);
//false
v.clear();
v.add(propertySensor6);
v.add(propertySensor7);
Expression expression2 = new LogicalAnd(v,true);
//false
v.clear();
v.add(propertySensor1);
v.add(propertySensor6);
Expression expression3 = new LogicalAnd(v,true);
//false
v.clear();
v.add(propertySensor1);
v.add(new BooleanConstant(false));
Expression expression4 = new LogicalAnd(v,true);
//false
v.clear();
v.add(new BooleanConstant(true));
v.add(new BooleanConstant(false));
Expression expression5 = new LogicalAnd(v,true);
//true
v.clear();
v.add(new BooleanConstant(true));
v.add(new BooleanConstant(true));
Expression expression6 = new LogicalAnd(v,true);
assertTrue(((Boolean) expression1.evaluate()).booleanValue());
assertFalse(
((Boolean) expression2.evaluate()).booleanValue());