Package junit.framework

Examples of junit.framework.TestSuite


        if (expectError && !hasError)
            fail("No error detected: "+expectError);
    }

    public static TestSuite suite() {
        TestSuite rslt = new TestSuite();

        rslt.setName("Examples from documentation");
        for (int sp = 0; sp < specs.length; sp++) {
            TestSuite spec = new TestSuite();
           
            String specName = specs[sp].name();
            spec.setName(specName);
//            if (!specName.equals("http"))
//                continue;
            if (specs[sp].isIRISpec())
                addAllTestsFromExamples(sp, spec);
           
            addExamples(sp,null,specs[sp],spec);
            if (spec.countTestCases()>0)
                rslt.addTest(spec);
        }
//        if (false)
        addAllTestsFromExamples(-1, rslt);
        return rslt;
View Full Code Here


    }

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

import junit.framework.TestCase;
import junit.framework.TestSuite;

public class TestPackage extends TestCase{
    public static TestSuite suite() {
        TestSuite rslt = new TestSuite();

        rslt.setName("IRI");
        rslt.addTest(TestExample.suite());
        rslt.addTest(TestMoreExamples.suite());
        rslt.addTest(MoreTests.suite());
       
        return rslt;
    }
View Full Code Here

        }
    }

    public static Test suite()
    {
        return new TestSuite(Tests.class);
    }
View Full Code Here

*/
public class MoreTests extends TestCase {
 
  static public Test suite() {
    TestSuite suite = new TestSuite("Additional IRI Tests");

   
    suite.addTest(new MoreTests("testRelativizeFrag1"));
    suite.addTest(new MoreTests("testRelativizeFrag2"));
   
    return suite;
  }
View Full Code Here

        throw new UnsupportedOperationException();
    }

    static TestSuite suitex() throws SAXException, IOException, ParserConfigurationException {
        SAXParserFactory fact = SAXParserFactory.newInstance();
        TestSuite result = new TestSuite();
        result.setName("More IRI Tests");
        InputStream in = TestCreator.class.getClassLoader().getResourceAsStream("com/hp/hpl/jena/iri/test/test.xml");
            fact.newSAXParser().parse(in,
            new TestReader(result)
            );
View Full Code Here

        } catch (ParserConfigurationException e) {
            e.printStackTrace();
        }
//        System.err.println("Yes chris we know");
//        return
        TestSuite r2 = new TestSuite("exception-while-building-testsuite");
//        r2.addTest(new TestMoreExamples("testDummy"));
        return r2;
    }
View Full Code Here

            else if (name.equals("Result"))
                push(new TestMEResult(att,(TestSuite)stack.peek()));
            else if (name.equals("Relativize"))
                push(new TestMERelativize(att,(TestSuite)stack.peek()));
            else if (name.equals("Resolve"))
                push(new TestSuite());
            else if (!name.equals("UriTests"))
                add(name, att);
        }
View Full Code Here

            if (text.length()>0)
                ((TestMoreExamples) stack.peek()).add(text);
        }
        public void endElement(String arg1, String arg2, String name) {
            if (name.equals("Resolve")) {
                TestSuite t = (TestSuite) stack.pop();
                t.
                setName(((TestCase)t.testAt(0)).getName() + "  " +
                        ((TestCase)t.testAt(1)).getName());
            } else if (name.equals("IRI") || name.equals("Result")
                    || name.equals("Relativize")) {
                stack.pop();
            }
View Full Code Here

           
        }
    }

    public static TestSuite suite() {
        TestSuite rslt = new TestSuite();

        rslt.setName("Error messages");
        addAllTestsFromExamples( rslt);
        return rslt;
    }
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.