Package com.puppetlabs.geppetto.junitresult

Examples of com.puppetlabs.geppetto.junitresult.JunitResult


*/
public class TestTessuite extends TestCase {

  public void testLoad_Bougie_testsuite() throws IOException {
    File f = TestDataProvider.getTestFile(new Path("testData/BougieTest_testsuite.xml"));
    JunitResult result = JunitresultLoader.loadFromXML(f);

    assertTrue("should be a Testsuite instance", result instanceof Testsuite);
    Testsuite rootsuite = (Testsuite) result;
    assertEquals("net.cars.engine.BougieTest", rootsuite.getName());
    assertEquals(2, rootsuite.getTests());
View Full Code Here


    assertEquals("IBM Corporation", p.getValue());
  }

  public void testLoad_CarborateurTest() throws IOException {
    File f = TestDataProvider.getTestFile(new Path("testData/CarborateurTest_testsuite.xml"));
    JunitResult result = JunitresultLoader.loadFromXML(f);
    assertTrue("should be a Testsuite instance", result instanceof Testsuite);
    Testsuite rootsuite = (Testsuite) result;
    assertEquals("net.cars.engine.CarburateurTest", rootsuite.getName());

    // should have one testcase with a failure
View Full Code Here

  }

  public void testLoad_DelcoTest() throws IOException {
    File f = TestDataProvider.getTestFile(new Path("testData/DelcoTest_testsuite.xml"));
    JunitResult result = JunitresultLoader.loadFromXML(f);
    assertTrue("should be a Testsuite instance", result instanceof Testsuite);
    Testsuite rootsuite = (Testsuite) result;
    assertEquals("net.cars.engine.DelcoTest", rootsuite.getName());

    assertEquals("Rotation is simulated for a four spark engine with an angle of 0?.\n", rootsuite.getSystem_out());
View Full Code Here

  }

  public void test_aggregatorSampleTest() throws IOException, TransformerException, ParserConfigurationException {
    JunitresultAggregator aggregator = new JunitresultAggregator();
    File root = TestDataProvider.getTestFile(new Path("testData/allresults/"));
    JunitResult result = aggregator.aggregate(root, root);
    assertTrue(result instanceof Testsuites);
    Testsuites testsuite = (Testsuites) result;
    assertEquals("allresults", testsuite.getName());
    assertEquals(1, testsuite.getErrors());
    assertEquals(13, testsuite.getTests());
View Full Code Here

      root = TestDataProvider.getTestFile(new Path("testData/test_results"));
      root.mkdir();

      FileUtils.unzip(TestDataProvider.getTestFile(new Path("testData/test_results.zip")), root);

      JunitResult result = aggregator.aggregate(root, root);
      assertTrue(result instanceof Testsuites);
      Testsuites testsuite = (Testsuites) result;
      assertEquals("test_results", testsuite.getName());
      assertEquals(3, testsuite.getErrors());
      assertEquals(1360, testsuite.getTests());
View Full Code Here

*/
public class TestTestrun extends TestCase {

  public void testLoad_Bougie_testrun() throws IOException {
    File f = TestDataProvider.getTestFile(new Path("testData/BougieTest_testrun.xml"));
    JunitResult result = JunitresultLoader.loadFromXML(f);

    assertTrue("should be a Testrun instance", result instanceof Testrun);
    Testrun testrun = (Testrun) result;
    assertEquals("net.cars.engine.BougieTest", testrun.getName());
    assertEquals(2, testrun.getTests());
View Full Code Here

        if(result == null)
          result = defaultCase(theEObject);
        return result;
      }
      case JunitresultPackage.JUNIT_RESULT: {
        JunitResult junitResult = (JunitResult) theEObject;
        T result = caseJunitResult(junitResult);
        if(result == null)
          result = defaultCase(theEObject);
        return result;
      }
View Full Code Here

    parent.getTestsuites().add(containerSuite);
  }

  private void processXMLFile(AbstractAggregatedTest parent, File f) {
    try {
      JunitResult loaded = JunitresultLoader.loadFromXML(f);
      if(loaded instanceof Testrun) // a bit strange - this is an eclipse JUnit result
        processTestrun(parent, f, ((Testrun) loaded));
      else if(loaded instanceof Testsuite)
        processTestsuite(parent, f, ((Testsuite) loaded));
      else if(loaded instanceof Testsuites)
View Full Code Here

TOP

Related Classes of com.puppetlabs.geppetto.junitresult.JunitResult

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.