Ejemplo n.º 1
0
 @Override
 public void endElement(final String namespaceURI, final String localName, final String qName) {
   if ("testsuite".equals(qName)) {
     // nothing
   } else if ("testcase".equals(qName)) {
     // nothing
   } else if ("step".equals(qName)) {
     // nothing
   } else if ("node_order".equals(qName)) {
     final TestNode node = getParentTestNode();
     if (node != null) {
       node.setNodeOrder(getTextValueAsInt());
     }
   } else if ("details".equals(qName)) {
     final TestSuite node = getParentTestSuite();
     if (node != null) {
       node.setDetails(getTextValue());
     }
   } else if ("externalid".equals(qName)) {
     final TestCase node = getParentTestCase();
     if (node != null) {
       node.setExternalId(getTextValueAsInt());
     }
   } else if ("version".equals(qName)) {
     final TestCase node = getParentTestCase();
     if (node != null) {
       node.setVersion(getTextValueAsInt());
     }
   } else if ("summary".equals(qName)) {
     final TestCase node = getParentTestCase();
     if (node != null) {
       node.setSummary(getTextValue());
     }
   } else if ("preconditions".equals(qName)) {
     final TestCase node = getParentTestCase();
     if (node != null) {
       node.setPreconditions(getTextValue());
     }
   } else if ("execution_type".equals(qName)) {
     final TestCase node = getParentTestCase();
     if (node != null) {
       node.setExecutionType(getTextValueAsInt());
     }
   } else if ("importance".equals(qName)) {
     final TestCase node = getParentTestCase();
     if (node != null) {
       node.setImportance(getTextValueAsInt());
     }
   } else if ("step_number".equals(qName)) {
     final TestStep node = getParentTestStep();
     if (node != null) {
       node.setStepNumber(getTextValueAsInt());
     }
   } else if ("actions".equals(qName)) {
     final TestStep node = getParentTestStep();
     if (node != null) {
       node.setActions(getTextValue());
     }
   } else if ("expectedresults".equals(qName)) {
     final TestStep node = getParentTestStep();
     if (node != null) {
       node.setExpectedResults(getTextValue());
     }
   } else if ("execution_type".equals(qName)) {
     final TestStep node = getParentTestStep();
     if (node != null) {
       node.setExecutionType(getTextValueAsInt());
     }
   }
   queue.removeLast();
 }