Examples of TestCase


Examples of com.google.testing.testify.risk.frontend.model.TestCase

        bug.setState(item.getString("status"));
        bug.setStateDate(item.getLong("statusDate"));
        dataService.addBug(bug);
      } else if (json.has("test")) {
        item = json.getJSONObject("test");
        TestCase test = new TestCase();
        test.setParentProjectId(item.getLong("projectId"));
        test.setExternalId(item.getLong("testId"));
        test.setTitle(item.getString("title"));
        test.setTags(Sets.newHashSet(StringUtil.csvToList(item.getString("tags"))));
        test.setTestCaseUrl(item.getString("url"));
        test.setState(item.getString("result"));
        test.setStateDate(item.getLong("resultDate"));
        dataService.addTestCase(test);
      } else if (json.has("checkin")) {
        item = json.getJSONObject("checkin");
        Checkin checkin = new Checkin();
        checkin.setParentProjectId(item.getLong("projectId"));
View Full Code Here

Examples of com.hamburgsud.log4testing.core.data.TestCase

  protected static TestCase testCase;

  @BeforeClass
  public static void createTestCase() {
    testCase = new TestCase(AssertTest.class.getName());
  }
View Full Code Here

Examples of com.puppetlabs.geppetto.junitresult.Testcase

    Testsuite testsuite = rootsuite;
    assertEquals("net.cars.engine.BougieTest", testsuite.getName());
    assertEquals(0.017, testsuite.getTime());

    assertEquals("There should be two testcases", 2, testsuite.getTestcases().size());
    Testcase tc1 = testsuite.getTestcases().get(0);
    Testcase tc2 = testsuite.getTestcases().get(1);

    assertEquals("sparkDry", tc1.getName());
    assertEquals("net.cars.engine.BougieTest", tc1.getClassname());
    assertEquals(0.0010, tc1.getTime());

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

Examples of com.topcoder.shared.problem.TestCase

        Method method = new Method(problem.getMethodName(), convertType(problem.getReturnType()), params);

        LanguageTrait trait = LanguageManager.getInstance().getTrait(language);
        Testcase[] cases = new Testcase[problem.getTestCases().length];
        for (int i = 0; i < cases.length; ++i) {
            TestCase tc = problem.getTestCases()[i];
            ParamValue[] input = new ParamValue[tc.getInput().length];
            for (int j = 0; j < input.length; j++)
                input[j] = trait.parseValue(tc.getInput()[j], params[j]);
            ParamValue output = trait.parseValue(tc.getOutput(), new Param("expected", method.getReturnType(), params.length));
            cases[i] = new Testcase(i, input, output);

            if (tc.getAnnotation() != null) {
                String ann = getRidOfTopElement(tc.getAnnotation().toXML());
                ann = commonTCXMLFixes(ann);
                if ( ann.length() != 0 ) {
                    cases[i].setAnnotation(ann);
                }
            }
View Full Code Here

Examples of com.vividsolutions.jtstest.test.TestCase

  private String opName = "";
  private Geometry resultGeom = null;
 

  public TestCaseEdit(PrecisionModel pm) {
    TestCase testCase = new TestCase();
    testCase.setPrecisionModel(pm);
    testable = testCase;
  }
View Full Code Here

Examples of com.vividsolutions.jtstest.testrunner.TestCase

  public static void main(String[] args) throws Exception {
    TestReader testReader = new TestReader();
    TestRun testRun = testReader.createTestRun(new File("c:\\blah\\isvalid.xml"), 0);
    ArrayList geometries = new ArrayList();
    for (Iterator i = testRun.getTestCases().iterator(); i.hasNext(); ) {
      TestCase testCase = (TestCase) i.next();
      add(testCase.getGeometryA(), geometries);
      add(testCase.getGeometryB(), geometries);
    }
    String run = "";
    int j = 0;
    for (Iterator i = geometries.iterator(); i.hasNext(); ) {
      Geometry geometry = (Geometry) i.next();
View Full Code Here

Examples of diva.util.jester.TestCase

    //// Test methods

    /** Test the nullary constructor
     */
    public void testConstructor1() {
        runTestCase(new TestCase("JCanvas constructor 1") {
            JCanvas canvas;

            public void run() throws Exception {
                canvas = factory.createJCanvas();
            }
View Full Code Here

Examples of greed.model.Testcase

        Method method = new Method("TestMethod", retType, new Param[]{param1, param2, param3});

        String[] valueList0 = new String[]{"919, 111, 234", "234, 567, 555"};
        String[] valueList1 = new String[]{"\"a\", \"b\", \"c\"", "\"d\""};
        String[] valueList2 = new String[]{"\"abcd\", \"efg\"", "\"123\", \"456\""};
        Testcase case0 = new Testcase(0, new ParamValue[]{
                new ParamValue(param1, "15"),
                new ParamValue(param2, valueList0),
                new ParamValue(param3, valueList1)
        }, new ParamValue(new Param("return", retType, 0), valueList2));
View Full Code Here

Examples of hu.sztaki.ilab.longneck.TestCase

        blocks.add(snBlock);
        process.setBlocks(blocks);

        // Set test cases

        TestCase testCase = new TestCase();
        RecordImplForTest sourceRecord = new RecordImplForTest();
        sourceRecord.setRole("source");
        sourceRecord.add(new Field("id", "42"));
        testCase.addRecord(sourceRecord);
        RecordImplForTest targetRecord = new RecordImplForTest();
        targetRecord.setRole("target");
        targetRecord.add(new Field("id", null));
        testCase.addRecord(targetRecord);

        List<TestCase> testCases = new ArrayList<TestCase>();
        testCases.add(testCase);
        process.setTestCases(testCases);

        CompactProcess cProcess = new CompactProcess(process, repository,
            frameAddressResolver, runtimeProperties);

        ProcessTester tester = new ProcessTester(cProcess, true);

        assertTrue(tester.testAll());

        // Add a test that fails

        TestCase testCase2 = new TestCase();
        RecordImplForTest sourceRecord2 = new RecordImplForTest();
        sourceRecord2.setRole("source");
        sourceRecord2.add(new Field("id", "42"));
        testCase2.addRecord(sourceRecord2);
        RecordImplForTest targetRecord2 = new RecordImplForTest();
        targetRecord2.setRole("target");
        targetRecord2.add(new Field("id", "42"));
        testCase2.addRecord(targetRecord2);

        testCases.add(testCase2);

        assertFalse(tester.testAll());
    }
View Full Code Here

Examples of intellijcoder.model.TestCase

    }

    private Matcher<Problem> hasTestCase(final String[] testInput, final String testOutput) {
        return new BaseMatcher<Problem>() {
            public boolean matches(Object o) {
                TestCase testCase = ((Problem) o).getTestCases()[0];
                return Arrays.equals(testCase.getInput(), testInput)
                        && testCase.getOutput().equals(testOutput);
            }

            public void describeTo(Description description) {
                description.appendText("testInput=" + Arrays.toString(testInput) + ", testOutput=" + testOutput);
            }
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.