Examples of TestCase


Examples of org.netbeans.modules.gsf.testrunner.api.Testcase

            this.stdErr = stdErr;
        }

        @Override
        public Testcase addTestcase(String name) {
            Testcase testcase = new Testcase(name, null, parent);
            testcases.add(testcase);
            return testcase;
        }
View Full Code Here

Examples of org.sgx.yuigwt.yui.test.TestCase

        console = Y.newConsole();
        console.render();

        TestCase1 test1Config = GWT.create(TestCase1.class);
        test1Config.setName("testcase1");
        TestCase testCase1 = Y.newTestCase(test1Config);

        TestCase2 test2Config = GWT.create(TestCase2.class);
        test2Config.setName("testcase2");
        TestCase testCase2 = Y.newTestCase(test2Config);

        TestSuite testSuite1 = Y.newTestSuite("testsute1");
        testSuite1.add(testCase1);
        testSuite1.add(testCase2);
View Full Code Here

Examples of org.sonar.api.test.TestCase

  @Test
  public void testable() throws Exception {
    MockUserSession.set().addComponentPermission(UserRole.CODEVIEWER, "SonarQube", FILE_KEY);

    TestCase testCase1 = testCase("test1", TestCase.Status.OK, 10L, "org.foo.BarTest.java", "src/test/java/org/foo/BarTest.java");
    TestCase testCase2 = testCase("test2", TestCase.Status.ERROR, 97L, "org.foo.FileTest.java", "src/test/java/org/foo/FileTest.java");
    when(testable.testCasesOfLine(10)).thenReturn(newArrayList(testCase1, testCase2));

    WsTester.TestRequest request = tester.newGetRequest("api/tests", "test_cases").setParam("key", FILE_KEY).setParam("line", "10");

    request.execute().assertJson("{\n" +
View Full Code Here

Examples of org.xilaew.atg.model.tests.TestCase

          break;
        }
      }
      // Read Values from Solver and store in Model
      if (solved == SolveResult.Solved) {
        TestCase tc = factory.createTestCase();
        result.getTests().add(tc);
        FunctionCall func = factory.createFunctionCall();
        func.setName(tcgActivity.getName());
        func.setActivity(tcgActivity);
        tc.setFunction(func);
        for (TCGVariable var : tcgActivity.getVariables()) {
          Value v = factory.createValue();
          v.setName(var.getName());
          v.setVariable(var);
          if (var.isIsParameter()) {
            Double value = null;
            try {
              value = ampl.getParameter(var.getName());
            } catch (IOException e) {
             
              e.printStackTrace();
              continue;
            }
            v.setValue(value);
            switch (var.getUsage()) {
            case IN_PARAMETER:
              func.getParameters().add(v);
              break;
            case OUT_PARAMETER:
              tc.getTestForValue().add(v);
              break;
            case INOUT_PARAMETER:
              // XXX INOUT parameters currently can not be handled
              // since there is only one value. For in/out
              // Parameters a pre and a post Value would be
              // necessary.
              // func.getParameters().add(v); //@pre
              // tc.getTestForValue().add(v); //post
              break;
            case RETURN_PARAMETER:
              tc.getTestForValue().add(v);
              break;
            default:
              break;
            }
          } else {
            List<Double> trace = null;
            try {
              trace = ampl.getVariable(var.getName());
            } catch (IOException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
              continue;
            }
            v.setValue(trace.get(0));
            tc.getInitValues().add(v);
            Value vout = factory.createValue();
            vout.setValue(trace.get(trace.size() - 1));
            vout.setName(var.getName());
            vout.setVariable(var);
            tc.getTestForValue().add(vout);
          }
        }
      }
    }
    return result;
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.