Esempio n. 1
0
 public String getDescriptionForXml(TestCase testCase) {
   if (isGdbcTestCase(testCase)) {
     return getDescriptionForXmlFromGdbcTestCase(testCase);
   }
   if (testCase.getDescription() != null && testCase.getDescription().length() > 0) {
     return "<desc>" + StringUtil.escapeHTML(testCase.getDescription()) + "</desc>\n";
   }
   if (testCase.getName() != null && testCase.getName().length() > 0) {
     return "<desc>" + StringUtil.escapeHTML(testCase.getName()) + "</desc>\n";
   }
   return "<desc> " + getGeometryArgPairCode(testCase.getGeometries()) + " </desc>\n";
 }
Esempio n. 2
0
 private boolean isGdbcTestCase(TestCase testCase) {
   if (testCase.getName() == null || testCase.getDescription() == null) {
     return false;
   }
   if (testCase.getName().equalsIgnoreCase(testCase.getDescription())) {
     return false;
   }
   int nameColonIndex = testCase.getName().indexOf(":");
   int descriptionColonIndex = testCase.getDescription().indexOf(":");
   if (nameColonIndex == -1 || descriptionColonIndex == -1) {
     return false;
   }
   if (nameColonIndex != descriptionColonIndex) {
     return false;
   }
   return true;
 }
Esempio n. 3
0
 public String getDescriptionForXmlFromGdbcTestCase(TestCase testCase) {
   int descriptionColonIndex = testCase.getDescription().indexOf(":");
   return "<desc>"
       + StringUtil.escapeHTML(
           testCase.getName()
               + " ["
               + testCase.getDescription().substring(1 + descriptionColonIndex).trim()
               + "]")
       + "</desc>\n";
 }