コード例 #1
0
  /**
   * Updates the ui and test states.
   *
   * @param mngr Manager
   * @param ts Test session
   */
  @Override
  public void updateUI(Manager mngr, TestSession ts) {
    Testcase tc = ts.getCurrentTestCase();
    final Matcher m = getMatcher();

    if (tc != null && tc.getClassName().equals(m.group(3)) && tc.getName().equals(m.group(4))) {
      final String location = m.group(1) + ":" + m.group(2);
      tc.setLocation(location);

      Trouble t = tc.getTrouble();

      if (t == null) {
        t = new Trouble(true);
      }

      t.setError(true);
      t.setStackTrace(new String[] {location});
      tc.setTrouble(t);
    }
  }