private String getPDFLine(
     String number, String name, String hexValue, String useTo, String characteristicThing) {
   String s = "";
   s += Is.empty(number) ? "" : number + " ";
   s += Is.empty(name) ? "" : name + " ";
   s += Is.empty(hexValue) ? "" : hexValue + " ";
   s += Is.empty(useTo) ? "" : useTo + " ";
   s += Is.empty(characteristicThing) ? "" : characteristicThing + " ";
   return s.trim();
 }
Esempio n. 2
0
 public void testValidValuesInList() throws Exception {
   int quantity = getListRowCount();
   assertTrue("For this test is needed at least one created delivery", quantity > 0);
   Collection values = new ArrayList();
   values.add("Lokal");
   values.add("Nachional");
   values.add("Internachional");
   boolean thereIsOne = false;
   for (int i = 0; i < quantity; i++) {
     String value = getValueInList(i, "distance");
     if (Is.emptyString(value)) continue;
     if (values.contains(value)) {
       thereIsOne = true;
       continue;
     }
     fail("Only the next values are valid: " + values);
   }
   assertTrue(
       "For this test is need at least one delivery with value in 'distance' property",
       thereIsOne);
 }