Package de.berndsteindorff.junittca.model

Examples of de.berndsteindorff.junittca.model.Run


      tfProjectName.setText(project.getName());
      createTableHistory(project.getTestRuns());
      repaint();
    } else if (ename.equals(TcaEventCommands.UPDATERUN)) {
      Project project = model.getProject();
      Run run = project.getTestRuns().get(0);
      Result result = run.getResult();
      counterPanel.setRunValue(result.getRunCount());
      counterPanel.setIgnoredValue(result.getIgnoreCount());
      counterPanel.setOkValue(result.getRunCount()
          - result.getFailureCount());
      counterPanel.setFailureValue(result.getFailureCount());
View Full Code Here


      }
    }

    @Override
    public Object getValueAt(int row, int col) {
      Run run = runs.get(row);
      if (col == 0) {
        Calendar cal = new GregorianCalendar();
        cal.setTime(run.getRunDate());
        int d = cal.get(Calendar.DAY_OF_MONTH);
        int m = cal.get(Calendar.MONTH) + 1;
        int y = cal.get(Calendar.YEAR);
        int h = cal.get(Calendar.HOUR_OF_DAY);
        int min = cal.get(Calendar.MINUTE);
        int s = cal.get(Calendar.SECOND);

        StringBuffer sb = new StringBuffer();
        sb.append(m > 9 ? (m + "/") : ("0" + m + "/"));
        sb.append(d > 9 ? (d + "/") : ("0" + d + "/"));
        sb.append("0" + (y - 2000) + " ");
        sb.append(h > 9 ? h : ("0" + h));
        sb.append(":");
        sb.append(min > 9 ? min : ("0" + min));
        sb.append(":");
        sb.append(s > 9 ? s : ("0" + s));

        return sb.toString();
      } else if (col == 1) {
        return "" + run.getClassMethods().size();
      } else if (col == 2) {
        return "" + run.getResult().getRunCount();
      } else if (col == 3) {
        return ""
            + (run.getResult().getRunCount() - run.getResult()
                .getFailureCount());
      } else if (col == 4) {
        return "" + run.getResult().getFailureCount();
      } else if (col == 5) {
        // logger.info("row: " + row);
        // logger.info("selectedRuns.length: " + selectedRuns.length);
        return selectedRuns[row];
      } else
View Full Code Here

    try {

      project.runTests();
      assertEquals(1, project.getTestRuns().size());
      Run run1 = project.getTestRuns().get(0);
      assertEquals(1, run1.getClassMethods().size());
      ClassMethods cm1 = run1.getClassMethods().get(0);
      assertEquals(3, cm1.getTestMethods().size());
      loadChangedClass();

      project.runTests();
      assertEquals(2, project.getTestRuns().size());
      Run run2 = project.getTestRuns().get(0);
      assertEquals(1, run2.getClassMethods().size());
      ClassMethods cm2 = run2.getClassMethods().get(0);
      assertEquals(4, cm2.getTestMethods().size());
    } finally {
      loadOldClass();
    }
View Full Code Here

    ClassMethods cm = new ClassMethods(NAME_DUMMYTEST, CLASSPATH + DIRSEP,
        testMethods, ignoredTestMethods);
    List<ClassMethods> cms = new ArrayList<ClassMethods>(1);
    cms.add(cm);
    try {
      runs.add(new Run(new Date(), result, cms));
      fail("Es konnte die Liste der Runs doch verändert werden");
    } catch (UnsupportedOperationException e) {
      assertEquals(UnsupportedOperationException.class, e.getClass());
    }
  }
View Full Code Here

    // 1. Testlauf
    // logger.info("1. Testlauf");
    project.runTests();
    assertEquals(1, project.getTestRuns().size());
    Run run1 = project.getTestRuns().get(0);
    Date date1 = run1.getRunDate();

    // 2. Testlauf
    // logger.info("2. Testlauf");
    project.runTests();
    assertEquals(2, project.getTestRuns().size());
    Run run2 = project.getTestRuns().get(0);
    Date date2 = run2.getRunDate();
    // logger.info("date1: " + date1 + date1.getTime());
    // logger.info("date2: " + date2 + date2.getTime());
    assertEquals(true, date2.after(date1));

    // 3. Testlauf
    // logger.info("3. Testlauf");
    project.runTests();
    assertEquals(3, project.getTestRuns().size());
    Run run3 = project.getTestRuns().get(0);
    Date date3 = run3.getRunDate();
    // logger.info("date1: " + date1 + date1.getTime());
    // logger.info("date2: " + date2 + date2.getTime());
    // logger.info("date3: " + date3 + date3.getTime());
    assertEquals(true, date3.after(date1));
    assertEquals(true, date3.after(date2));
View Full Code Here

TOP

Related Classes of de.berndsteindorff.junittca.model.Run

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.