Package net.jsunit

Examples of net.jsunit.TestSuiteResult


        super(name);
    }

    public void setUp() throws Exception {
        super.setUp();
        result = new TestSuiteResult(null);
        result.setJsUnitVersion("2.5");
        result.setId("An ID");
        result.setUserAgent("Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)");
        result.setRemoteAddress("Dummy Remote Address");
        result.setBaseURL("about:mozilla");
View Full Code Here


        result.setTestCaseStrings(new String[]{"testFoo|1.3|S||", "testFoo|1.3|E|Test Error Message|", "testFoo|1.3|F|Test Failure Message|"});
    }

    public void testId() {
        assertNotNull(result.getId());
        result = new TestSuiteResult(null);
        result.setId("foo");
        assertEquals("foo", result.getId());
    }
View Full Code Here

    }

    public void testBuildFromXml() {
        Utility.writeFile(result.writeXml(), "resultXml.xml");
        File file = new File("resultXml.xml");
        TestSuiteResult reconstitutedResult = TestSuiteResult.fromXmlFile(file);
        assertFields(reconstitutedResult);
        file.delete();
    }
View Full Code Here

        String id = request.getParameter(TestSuiteResultWriter.ID);
        String xml = null;
        if (id == null) {
            xml = "<error>No id specified</error>";
        } else {
            TestSuiteResult result = server.findResultWithId(id);
            if (result != null)
                xml = result.writeXml();
            else
                xml = "<error>No Test Result has been submitted with id " + id + "</error>";
        }
        response.setContentType("text/xml");
        OutputStream out = response.getOutputStream();
View Full Code Here

public class ResultAcceptorServlet extends JsUnitServlet {

    protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        Utility.log("ResultAcceptorServlet: Received request");
        TestSuiteResult result = server.accept(request);
        String xml = result.writeXml();
        response.setContentType("text/xml");
        OutputStream out = response.getOutputStream();
        out.write(xml.getBytes());
        out.close();
        Utility.log("ResultAcceptorServlet: Done");
View Full Code Here

TOP

Related Classes of net.jsunit.TestSuiteResult

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.