@@ -0,0 +1,1335 @@
+package org.flymine.web;%0A%0A/*%0A * Copyright (C) 2002-2003 FlyMine%0A *%0A * This code may be freely distributed and modified under the%0A * terms of the GNU Lesser General Public Licence.  This should%0A * be distributed with the code.  See the LICENSE file for more%0A * information or http://www.gnu.org/copyleft/lesser.html.%0A *%0A */%0A%0Aimport servletunit.struts.MockStrutsTestCase;%0A%0Aimport org.flymine.objectstore.query.Query;%0Aimport org.flymine.objectstore.query.fql.FqlQuery;%0A%0Apublic class RunQueryActionTest extends MockStrutsTestCase %7B%0A%0A    public RunQueryActionTest(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 testRunValidQuery() %7B%0A        setRequestPathInfo(%22/runQuery%22);%0A        getSession().setAttribute(%22query%22, new FqlQuery(%22select c from Company as c%22, %22org.flymine.model.testmodel%22).toQuery());%0A        actionPerform();%0A        verifyForward(%22results%22);%0A        assertNotNull(getSession().getAttribute(%22results%22));%0A        verifyNoActionErrors();%0A    %7D%0A%0A    public void testRunNoQueryPresent() %7B%0A        setRequestPathInfo(%22/runQuery%22);%0A        actionPerform();%0A        verifyForward(%22error%22);%0A        assertNull(getSession().getAttribute(%22results%22));%0A    %7D%0A%7D%0A

Test class for RunQueryAction