Package com.google.eclipse.javascript.jstestdriver.core.model

Examples of com.google.eclipse.javascript.jstestdriver.core.model.EclipseJstdBrowserRunResult


  TestResult error1 = new TestResult(null, "error", "", "", "testcase2", "test6", 0f);
  TestResult error2 = new TestResult(null, "error", "", "", "testcase", "test7", 0f);

  public void testSelect() throws Exception {
    ViewerFilter filter = new FailureOnlyViewerFilter();
    ResultModel model = new EclipseJstdBrowserRunResult(null, "browser");

    model.addTestResult(passing1);
    model.addTestResult(passing2);
    model.addTestResult(failed1);
    model.addTestResult(failed2);
    model.addTestResult(error1);
    model.addTestResult(error2);

    Iterator<? extends ResultModel> iterator = model.getChildren().iterator();
    ResultModel testcase1 = iterator.next();
    ResultModel testcase3 = iterator.next();
    ResultModel testcase2 = iterator.next();
   
    assertTrue(filter.select(null, null, model));
View Full Code Here


    model.addTestResult(failed1);
    assertTrue(model.hasChildren());
  }
 
  public void testGetNumbers() throws Exception {
    ResultModel model = new EclipseJstdBrowserRunResult(null, "browser");
   
    assertEquals(0, model.getNumberOfTests());
    assertEquals(0, model.getNumberOfFailures());
    assertEquals(0, model.getNumberOfErrors());
   
    model.addTestResult(passing1);
    model.addTestResult(failed1);
    model.addTestResult(error1);

    assertEquals(3, model.getNumberOfTests());
    assertEquals(1, model.getNumberOfFailures());
    assertEquals(1, model.getNumberOfErrors());

    model.addTestResult(passing2);
    model.addTestResult(failed2);
    model.addTestResult(failed3);
    model.addTestResult(error2);
   
    assertEquals(7, model.getNumberOfTests());
    assertEquals(3, model.getNumberOfFailures());
    assertEquals(2, model.getNumberOfErrors());
  }
View Full Code Here

    assertEquals(3, model.getNumberOfFailures());
    assertEquals(2, model.getNumberOfErrors());
  }
 
  public void testAddTestResultTestCase() throws Exception {
    ResultModel model = new EclipseJstdBrowserRunResult(null, "browser");

    model.addTestResult(passing1);
    model.addTestResult(failed1);
    model.addTestResult(error1);
    model.addTestResult(passing2);
    model.addTestResult(failed2);
    model.addTestResult(failed3);
    model.addTestResult(error2);
   
    assertEquals(2, model.getChildren().size());
    Iterator<? extends ResultModel> iterator = model.getChildren().iterator();
    ResultModel testcase1 = iterator.next();
    ResultModel testcase2 = iterator.next();
   
    assertEquals("testcase1 (10.0 ms)", testcase1.getDisplayLabel());
    assertEquals(3, testcase1.getNumberOfTests());
View Full Code Here

    assertEquals(1, testcase2.getNumberOfErrors());
    assertEquals(2, testcase2.getNumberOfFailures());
  }
 
  public void testGetTotalTimeTaken() throws Exception {
    BaseResultModel model = new EclipseJstdBrowserRunResult(null, "browser");

    model.addTestResult(passing1);
    model.addTestResult(failed1);
    model.addTestResult(error1);
    model.addTestResult(passing2);
    model.addTestResult(failed2);
    model.addTestResult(failed3);
    model.addTestResult(error2);
   
    assertEquals(2, model.getChildren().size());
    assertEquals(28f, model.getTotalTimeTaken());
    Iterator<? extends ResultModel> iterator = model.getChildren().iterator();
    BaseResultModel testcase1 = (BaseResultModel) iterator.next();
    BaseResultModel testcase2 = (BaseResultModel) iterator.next();
   
    assertEquals("testcase1 (10.0 ms)", testcase1.getDisplayLabel());
    assertEquals(10f, testcase1.getTotalTimeTaken());
View Full Code Here

TOP

Related Classes of com.google.eclipse.javascript.jstestdriver.core.model.EclipseJstdBrowserRunResult

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.