Examples of JUnitService


Examples of org.apache.felix.sigil.common.junit.server.JUnitService

       
        return runTests(tests, quiet, dir);
    }
   
    public void listTests() {
        JUnitService service = ( JUnitService ) tracker.getService();
       
        if ( service == null ) {
            throw new IllegalStateException(JUnitService.class.getName() + " not found");
        }
       
        for (String t : service.getTests())
        {
            System.out.println("\t" + t);
            System.out.flush();
        }
    }
View Full Code Here

Examples of org.apache.felix.sigil.common.junit.server.JUnitService

        }
    }

    private TestSuite[] findTests(String t)
    {
        JUnitService service = ( JUnitService ) tracker.getService();
       
        if ( service == null ) {
            throw new IllegalStateException(JUnitService.class.getName() + " not found");
        }
       
        if (t.contains("*"))
        {
            Pattern p = compile(t);
            LinkedList<TestSuite> tests = new LinkedList<TestSuite>();
            for (String n : service.getTests())
            {
                if (p.matcher(n).matches())
                {
                    tests.add(service.createTest(n));
                }
            }
            return tests.toArray(new TestSuite[tests.size()]);
        }
        else
        {
            TestSuite test = service.createTest(t);
            return test == null ? new TestSuite[0] : new TestSuite[] { test };
        }
    }
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.