Package com.sun.javatest

Examples of com.sun.javatest.Status


        super(name);
    }

    @Override
    public void testSignatures() {
        Status status = null;
        try {
            String javaVersion = System.getProperty("java.version");
            Vector args = new Vector();
            // Get the location of the rule execution sets.
            // Currently we assume we can find the signature file here
            // as well.
            String dir = TestCaseUtil.getRuleExecutionSetLocation();
            args.add("-FileName");
            if (javaVersion.startsWith("1.4")) {
                args.add(dir + "/" + "jaxrules14.sig");
            } else if (javaVersion.startsWith("1.5") || javaVersion.startsWith("1.6")) {
                args.add(dir + "/" + "jaxrules.sig");
            } else {
                args.add(dir + "/" + "jaxrules17.sig");
            }

            args.add("-Package");
            args.add("javax.rules");

            ByteArrayOutputStream os = new ByteArrayOutputStream(2000);
            PrintWriter pw = new PrintWriter(os);

            Test test = new SignatureTest();
            status = test.run((String[]) args.toArray(new String[0]),
                    pw, null);

            pw.flush();
            // Print the results.
            System.out.println(os.toString());
            // Check whether we passed.
            assertTrue("[ApiSignatureTest] " + os.toString(),
                    status.isPassed());
            pw.close();
        }
        catch (Exception e) {
            fail(e.getMessage());
        }
View Full Code Here

TOP

Related Classes of com.sun.javatest.Status

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.