Package junit.framework

Examples of junit.framework.TestSuite


    }

    private static void addTestsFromExamples(TestSuite rslt,  ViolationCodeInfo violationCodeInfo) {
     
        if (violationCodeInfo != null) {
            TestSuite ex = new TestSuite();
            ex.setName(violationCodeInfo.getCodeName());
            addExamples(violationCodeInfo, violationCodeInfo, ex);
            if (ex.countTestCases()>0)
            rslt.addTest(ex);
        }
    }
View Full Code Here


    public AllJUnitTests(String name) {
        super(name);
    }

    public static Test suite() {
        TestSuite suite = new TestSuite(SkeletonTest.class);
    //TestSuite suite = new TestSuite();
        suite.addTest(new TestSuite(QuickServerTest.class));
        suite.addTest(new TestSuite(SimpleServerBlockTest.class));
    suite.addTest(new TestSuite(SimpleServerNBlockTest.class));
        return suite;
   }
View Full Code Here

import junit.framework.TestSuite;

public class CodegenSuite extends TestCase
{
    public static Test suite() {
        TestSuite suite = new TestSuite();
        suite.addTestSuite(UsageVisitorTest.class);
        suite.addTestSuite(TypeReplacementTest.class);
        suite.addTestSuite(CodeGenerationTest.class);
        return suite;
    }
View Full Code Here

import junit.framework.TestSuite;

public class ElementsSuite extends TestCase
{
    public static Test suite() {
        TestSuite suite = new TestSuite();
        suite.addTestSuite(EmptySchema.class);
        suite.addTestSuite(Annotations.class);
        suite.addTestSuite(SimpleGlobals.class);
        suite.addTestSuite(SimpleComplexTypes.class);
        suite.addTestSuite(SimpleSimpleTypes.class);
        suite.addTestSuite(SimpleGroups.class);
        return suite;
    }
View Full Code Here

  static private String manifestURI = "OWLManifest.rdf";
  static private boolean manifestInFactory = true;

  static public Test suite() {
    TestSuite s = new TestSuite("OWL-Syntax");
  //  s.addTest(Extra.suite());
  //  s.addTest(CmdLineTidyTest.suite());
    InputStream manifest;
    if (factory == null) {
      if (internet) {
        factory = new TestInputStreamFactory(wgTestDir, wgTestDir);
      } else {
        factory = new TestInputStreamFactory(wgTestDir, "wg");
      }
    }
    if (manifestInFactory) {
      manifest = factory.open(manifestURI);
    } else {
      try {
        try {
          manifest = new URL(manifestURI).openStream();
        } catch (MalformedURLException e) {
          manifest = new FileInputStream(manifestURI);
        }
      } catch (IOException e) {
        throw new JenaException(e);
      }
    }
    Model m = ModelFactory.createDefaultModel();
    m.read(manifest, "");

    Query query =
      new Query(
        "SELECT ?s, ?t, ?f, ?l "
          + "WHERE (?f rdf:type "
          + " <http://www.w3.org/2000/10/rdf-tests/rdfcore/testSchema#RDF-XML-Document> )"
          + " (?t ?p ?f ) "
          + " (?t rtest:status ?s) "
          + " (?f otest:level ?l ) "
          + "AND ?s ne \"OBSOLETED\""
          + "USING rtest FOR <http://www.w3.org/2000/10/rdf-tests/rdfcore/testSchema#>"
          + " otest FOR <http://www.w3.org/2002/03owlt/testOntology#>");

    //       Need to set the source if the query does not.
    query.setSource(m);
    QueryExecution qe = new QueryEngine(query);

    QueryResults results = qe.exec();

    for (Iterator iter = results; iter.hasNext();) {
      ResultBinding res = (ResultBinding) iter.next();

      addTest(s, res, m);
    }
    results.close();
    s.addTest(new DummyTest());
    return s;
  }
View Full Code Here

    if ((!doLargeTests)
      && testResource.hasProperty(OWLTest.size, OWLTest.Large)) {
      return;
    }

    TestSuite st =
      (TestSuite) getTest(s, ((Literal) status).getLexicalForm(), null);

    //  System.err.println(testURI);
    int lastSl = testURI.lastIndexOf('/');
    int penUltimateSl = testURI.lastIndexOf('/', lastSl - 1);
    int hash = testURI.lastIndexOf('#');
    //System.err.println(lastSl + " " + penUltimateSl + " " + hash);
    String dirName = testURI.substring(penUltimateSl + 1, lastSl);
    TestSuite dir = (TestSuite) getTest(st, dirName, null);
    String number = testURI.substring(hash - 3, hash);
    SyntaxTest test = (SyntaxTest) getTest(dir, number, testURI);
    String fileURI = ((Resource) testFile).getURI();
    test.add(factory.open(fileURI), (Resource) level, fileURI);
  }
View Full Code Here

        .equals(nm))
        return t;
    }

    if (syntaxTestURI == null) {
      t = new TestSuite(nm);
    } else {
      t = new SyntaxTest(nm, factory, syntaxTestURI);
    }
    s.addTest(t);
    return t;
View Full Code Here

*
*/
public class TimedTest {

  static public Test suite() {
    TestSuite s = new TestSuite("TimedTest");
    s.addTest(WGTests.suite());
    final long startTime[] = new long[1];
    s.addTest(new TestCase("start timer") {
      public void runTest() {
        startTime[0] = System.currentTimeMillis();
      }
    });
    WGTests.doLargeTests = true;
    s.addTest(WGTests.suite());
    s.addTest(new TestCase("end timer") {
      public void runTest() {
        System.err.println(
(        System.currentTimeMillis() - startTime[0])
+ " ms");
      }
View Full Code Here

* To change the template for this generated type comment go to
* Window - Preferences - Java - Code Generation - Code and Comments
*/
public class Extra extends TestCase {
  static public Test suite() {
    TestSuite s = new TestSuite(Extra.class);
    s.setName("More OWL syntax");
    s.addTest(CmdLineTidyTest.suite());
    return s;
   }
View Full Code Here

    /** Creates new TestPackage */
    private TestPackage() {
        super("owl syntax checker");
         addTest( "CommandLine", CmdLineTidyTest.suite() );
         addTest( Extra.suite() );
         addTest("OntModel",new TestSuite( TestOntModel.class ));
         addTest( WGTests.suite());

    }
View Full Code Here

TOP

Related Classes of junit.framework.TestSuite

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.