String s2 = "\"30 Sawmill River Rd, Hawthorne, NY 10532\"";
String s3 = "\"TollFree18007778888\"";
String s4 = "\"\"";
String s5 = "\"@#$%^&*(){}|\"";
//HashMap map = new HashMap();
propertySensor1=new StringConstant(s1);
propertySensor2=new StringConstant(s2);
propertySensor3=new StringConstant(s3);
propertySensor4=new StringConstant(s4);
propertySensor5=new StringConstant(s5);
//SensorLookup lookup = new SensorLookupImpl(map);
try {
Expression exp;
Vector v = new Vector();
v.add(new StringConstant(s1));
exp = new ContainsOnlyLettersOrDigits(v,true);
assertTrue(exp.evaluate().equals(Boolean.TRUE));
v.clear();
v.add(propertySensor1);
exp = new ContainsOnlyLettersOrDigits(v,true);
assertTrue(exp.evaluate().equals(Boolean.TRUE));
v.clear();
v.add(new StringConstant(s2));
exp = new ContainsOnlyLettersOrDigits(v,true);
assertTrue(exp.evaluate().equals(Boolean.FALSE));
v.clear();
v.add(propertySensor2);
exp = new ContainsOnlyLettersOrDigits(v,true);
assertTrue(exp.evaluate().equals(Boolean.FALSE));
v.clear();
v.add(new StringConstant(s3));
exp = new ContainsOnlyLettersOrDigits(v,true);
assertTrue(exp.evaluate().equals(Boolean.TRUE));
v.clear();
v.add(propertySensor3);
exp = new ContainsOnlyLettersOrDigits(v,true);
assertTrue(exp.evaluate().equals(Boolean.TRUE));
v.clear();
v.add(new StringConstant(s4));
exp = new ContainsOnlyLettersOrDigits(v,true);
assertTrue(exp.evaluate().equals(Boolean.TRUE));
v.clear();
v.add(propertySensor4);
exp = new ContainsOnlyLettersOrDigits(v,true);
assertTrue(exp.evaluate().equals(Boolean.TRUE));
v.clear();
v.add(new StringConstant(s5));
exp = new ContainsOnlyLettersOrDigits(v,true);
assertTrue(exp.evaluate().equals(Boolean.FALSE));
v.clear();
v.add(propertySensor5);