Пример #1
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);
 }