@@ -0,0 +1,1212 @@
+package org.flymine.web;%0A%0Aimport java.util.List;%0A%0Aimport servletunit.struts.MockStrutsTestCase;%0A%0Apublic class QueryActionTest extends MockStrutsTestCase %7B%0A%0A    public QueryActionTest(String testName) %7B%0A        super(testName);%0A    %7D%0A%0A    public void setUp() throws Exception %7B%0A        super.setUp();%0A    %7D%0A%0A    public void tearDown() throws Exception %7B%0A        super.tearDown();%0A    %7D%0A%0A    public void testSuccessfulQuery() %7B%0A       setRequestPathInfo(%22/query%22);%0A       addRequestParameter(%22querystring%22,%22select * from OJB_HL_SEQ%22);%0A       actionPerform();%0A       verifyForward(%22results%22);%0A       assertNotNull((List) getRequest().getAttribute(%22results%22));%0A       verifyNoActionErrors();%0A    %7D%0A%0A    public void testEmptyQuery() %7B%0A        setRequestPathInfo(%22/query%22);%0A        addRequestParameter(%22querystring%22,%22%22);%0A        actionPerform();%0A        verifyForward(%22error%22);%0A        assertNull((String) getRequest().getAttribute(%22results%22));%0A    %7D%0A%0A    public void testRubbishQuery() %7B%0A        setRequestPathInfo(%22/query%22);%0A        addRequestParameter(%22querystring%22,%22some rubbish%22);%0A        actionPerform();%0A        verifyForward(%22error%22);%0A        assertNull((String) getRequest().getAttribute(%22results%22));%0A    %7D%0A%7D%0A

Test for QueryAction