Package com.puppetlabs.geppetto.junitresult

Examples of com.puppetlabs.geppetto.junitresult.NegativeResult


    assertEquals("sparkHumid", tc2.getName());
    assertEquals("net.cars.engine.BougieTest", tc2.getClassname());
    assertEquals(0.0050, tc2.getTime());

    assertEquals(1, tc2.getErrors().size());
    NegativeResult error = tc2.getErrors().get(0);
    assertTrue(error instanceof com.puppetlabs.geppetto.junitresult.Error);
    assertEquals("java.lang.RuntimeException: humidity level too high\n" + //
        "\tat net.cars.engine.Bougie.spark(Unknown Source)\n" + //
        "\tat net.cars.engine.BougieTest.sparkHumid(BougieTest.java:36)\n", error.getValue());

    assertEquals(74, rootsuite.getProperties().size());
    Property p = rootsuite.getProperties().get(0);
    assertEquals("java.vendor", p.getName());
    assertEquals("IBM Corporation", p.getValue());
View Full Code Here


    // should have one testcase with a failure
    assertEquals("There should be one testcase", 1, rootsuite.getTestcases().size());
    Testcase tc = rootsuite.getTestcases().get(0);
    assertEquals(1, tc.getFailures().size());
    NegativeResult failure = tc.getFailures().get(0);
    assertNotNull(failure);
    assertTrue(failure instanceof Failure);
    assertEquals("Mix should be exactly 25. expected:<25> but was:<20>", failure.getMessage());
    assertEquals("junit.framework.AssertionFailedError: Mix should be exactly 25. expected:<25> but was:<20>\n" + //
        "\tat net.cars.engine.CarburateurTest.mix(CarburateurTest.java:34)\n", failure.getValue());

  }
View Full Code Here

    assertEquals("sparkHumid", tc2.getName());
    assertEquals("net.cars.engine.BougieTest", tc2.getClassname());
    assertEquals(0.005, tc2.getTime());

    assertEquals(1, tc2.getErrors().size());
    NegativeResult error = tc2.getErrors().get(0);
    assertTrue(error instanceof com.puppetlabs.geppetto.junitresult.Error);
    assertEquals("java.lang.RuntimeException: humidity level too high\n" + //
        "\tat net.cars.engine.Bougie.spark(Unknown Source)\n" + //
        "\tat net.cars.engine.BougieTest.sparkHumid(BougieTest.java:36)\n", error.getValue());

  }
View Full Code Here

        if(result == null)
          result = defaultCase(theEObject);
        return result;
      }
      case JunitresultPackage.NEGATIVE_RESULT: {
        NegativeResult negativeResult = (NegativeResult) theEObject;
        T result = caseNegativeResult(negativeResult);
        if(result == null)
          result = defaultCase(theEObject);
        return result;
      }
View Full Code Here

TOP

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

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.