protected XmlHandler getRootHandler9()

in agent/src/jetbrains/buildServer/xmlReportPlugin/parsers/mstest/TestResultsTableParser.java [171:213]


  protected XmlHandler getRootHandler9() {
    return elementsPath(
      new Handler() {
        public XmlReturn processElement(@NotNull final XmlElementInfo reader) {
          return reader.visitChildren(
              elementsPath(new Handler() {
                public XmlReturn processElement(@NotNull XmlElementInfo reader) {
                  final String outcome = reader.getAttribute("outcome");
                  final String[] textAndException = {null, null};

                  final TestOutcome testOutcome = TestOutcome.parse9(outcome);
                  if (testOutcome.isFailed() || testOutcome.isIgnored()) {
                    return reader.visitChildren(
                      elementsPath(new TextHandler() {
                        public void setText(@NotNull final String text) {
                          textAndException[0] = text;
                        }
                      }, "Text"),
                      elementsPath(new TextHandler() {
                        public void setText(@NotNull final String text) {
                          textAndException[1] = text;
                        }
                      }, "Exception")
                    ).than(new XmlAction() {
                      public void apply() {
                        if (textAndException[0] != null || textAndException[1] != null) {
                          processRunError(textAndException[0], textAndException[1]);
                        }
                      }
                    });
                  }
                  return reader.noDeep();
                }
              }, "ResultSummary", "RunInfos", "RunInfo"),
              elementsPath(new Handler() {
                public XmlReturn processElement(@NotNull final XmlElementInfo reader) {
                  return reader.visitChildren(getUnknown2008RecursiveResult(".*Result"));
                }
              }, "Results")
            );
        }
      }, "TestRun");
  }