Beispiel #1
0
 /** Method: checkEquipmentTypesArray(String originalText, String[] types, int first) */
 public void testcheckEquipmentTypesArray07() {
   boolean ok;
   try {
     ok = true;
     String[] types = new String[] {"NOT", "FOO", "ADD", "BAR", "IS", "BAZ"};
     TermUtilities.checkEquipmentTypesArray("COUNT[EQUIPMENT.NOT.FOO.ADD.BAR.IS.BAZ]", types, 0);
   } catch (TermEvaulatorException e) {
     ok = false;
   }
   is(ok, eq(true), "EquipmentTypesArray07 All options");
 }
Beispiel #2
0
 /** Method: checkEquipmentTypesArray(String originalText, String[] types, int first) */
 public void testcheckEquipmentTypesArray03() {
   boolean ok;
   try {
     ok = true;
     String[] types = new String[] {"EQUIPPED", "FOO"};
     TermUtilities.checkEquipmentTypesArray("COUNT[EQUIPMENT.EQUIPPED.FOO]", types, 0);
   } catch (TermEvaulatorException e) {
     ok = false;
   }
   is(ok, eq(false), "EquipmentTypesArray03 EQUIPPED with spurious type");
 }
Beispiel #3
0
 /** Method: checkEquipmentTypesArray(String originalText, String[] types, int first) */
 public void testcheckEquipmentTypesArray06() {
   boolean ok;
   try {
     ok = true;
     String[] types = new String[] {"IS", "FOO"};
     TermUtilities.checkEquipmentTypesArray("COUNT[EQUIPMENT.IS.FOO]", types, 0);
   } catch (TermEvaulatorException e) {
     ok = false;
   }
   is(ok, eq(true), "EquipmentTypesArray06 Only FOO");
 }
Beispiel #4
0
 /** Method: checkEquipmentTypesArray(String originalText, String[] types, int first) */
 public void testcheckEquipmentTypesArray02() {
   boolean ok;
   try {
     ok = true;
     String[] types = new String[] {"NOTEQUIPPED"};
     TermUtilities.checkEquipmentTypesArray("COUNT[EQUIPMENT.NOTEQUIPPED]", types, 0);
   } catch (TermEvaulatorException e) {
     ok = false;
   }
   is(ok, eq(false), "EquipmentTypesArray02 Single Type NOTEQUIPPED");
 }