Package de.berndsteindorff.junittca.model

Examples of de.berndsteindorff.junittca.model.Project.runTests()


    Project project = new Project("Bernds Projekt102");
    project.addTestClass(new ClassFile(NAME_DUMMYTEST, CLASSPATH + DIRSEP));

    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());
View Full Code Here


      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());
View Full Code Here

  @Test
  public void equalsAfterRun() throws ClassNotFoundException {
    Project project = new Project("bla");
    project.addTestClass(new ClassFile(Const.NAME_DUMMYTEST,
        Const.CLASSPATH + Const.DIRSEP));
    project.runTests();
    cm.equals(cm);

    assertEquals(cm, project.getTestRuns().get(0).getClassMethods().get(0));
  }
}
View Full Code Here

  public void classMethodsMethodExtractingSimple()
      throws ClassNotFoundException {
    logger.info("constructorAndMethodExtracting");
    Project project = new Project("Bla");
    project.addTestClass(new ClassFile(NAME_DUMMYTEST, CLASSPATH + DIRSEP));
    project.runTests();

    assertEquals(1, project.getTestRuns().size());
    assertEquals(1, project.getTestRuns().get(0).getClassMethods().size());

    ClassMethods classMethods = project.getTestRuns().get(0)
View Full Code Here

  public void classMethodsMethodExtractingSort()
      throws ClassNotFoundException {
    logger.info("constructorAndMethodExtracting");
    Project project = new Project("Bla");
    project.addTestClass(new ClassFile(NAME_DUMMYTEST, CLASSPATH + DIRSEP));
    project.runTests();

    assertEquals(1, project.getTestRuns().size());
    assertEquals(1, project.getTestRuns().get(0).getClassMethods().size());

    ClassMethods classMethods = project.getTestRuns().get(0)
View Full Code Here

      fail("Es konnte die Liste der Test-Klassen doch verändert werden");
    } catch (UnsupportedOperationException e) {
      assertEquals(UnsupportedOperationException.class, e.getClass());
    }

    project.runTests();

    List<Run> runs = project.getTestRuns();

    Result result = JUnitCore.runClasses(DummyTest.class);
    ArrayList<String> testMethods = new ArrayList<String>(3);
View Full Code Here

    project.setClasspath(Const.CLASSPATH);
    project.addTestClass(new ClassFile(NAME_DUMMYTEST, CLASSPATH + DIRSEP));

    // 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
View Full Code Here

    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());
View Full Code Here

    // 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());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.