コード例 #1
0
 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();
 }
コード例 #2
0
 public void testPostmodifiyCalculatorNotOnRead() throws Exception {
   assertListNotEmpty();
   execute("Mode.detailAndFirst");
   assertNoErrors();
   String description = getValue("description");
   assertTrue("Description must have value", !Is.emptyString(description));
   execute("Mode.list");
   assertNoErrors();
   execute("Mode.detailAndFirst");
   assertNoErrors();
   assertValue("description", description); // No changed on read
 }
コード例 #3
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);
 }