Index: lams_common/test/java/org/lamsfoundation/lams/learningdesign/TestActivity.java =================================================================== RCS file: /usr/local/cvsroot/lams_common/test/java/org/lamsfoundation/lams/learningdesign/Attic/TestActivity.java,v diff -u -r1.8 -r1.9 --- lams_common/test/java/org/lamsfoundation/lams/learningdesign/TestActivity.java 10 May 2005 23:53:31 -0000 1.8 +++ lams_common/test/java/org/lamsfoundation/lams/learningdesign/TestActivity.java 30 Aug 2005 04:37:18 -0000 1.9 @@ -1,18 +1,29 @@ -/* ******************************************************************************** - * Copyright Notice - * ================= - * This file contains propriety information of LAMS Foundation. - * Copying or reproduction with prior written permission is prohibited. - * Copyright (c) 2005 - * Created on 2005-2-18 - ******************************************************************************** */ +/* +Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +USA + +http://www.gnu.org/licenses/gpl.txt +*/ package org.lamsfoundation.lams.learningdesign; import java.util.Set; -import org.lamsfoundation.lams.AbstractLamsTestCase; import org.lamsfoundation.lams.learningdesign.dao.hibernate.ActivityDAO; +import org.lamsfoundation.lams.test.AbstractCommonTestCase; import org.lamsfoundation.lams.usermanagement.User; import org.lamsfoundation.lams.usermanagement.dao.IUserDAO; import org.lamsfoundation.lams.usermanagement.dao.hibernate.UserDAO; @@ -23,7 +34,7 @@ * @author Jacky Fang 2005-2-18 * */ -public class TestActivity extends AbstractLamsTestCase +public class TestActivity extends AbstractCommonTestCase { protected ActivityDAO activityDAO; protected IUserDAO userDAO; @@ -36,9 +47,6 @@ private static final Integer TEST_USER_ID = new Integer(2); private static final long TEST_CHILD_QNA_ACTIVITY_ID = 22; - /* - * @see AbstractLamsTestCase#setUp() - */ protected void setUp() throws Exception { super.setUp(); @@ -48,9 +56,6 @@ } - /* - * @see AbstractLamsTestCase#tearDown() - */ protected void tearDown() throws Exception { super.tearDown(); @@ -105,15 +110,4 @@ assertNotNull(child); assertEquals("verify id",TEST_CHILD_QNA_ACTIVITY_ID,child.getActivityId().longValue()); } - protected String[] getContextConfigLocation() { - return new String[] {"org/lamsfoundation/lams/applicationContext.xml"}; - } - /** - * @see org.lamsfoundation.lams.AbstractLamsTestCase#getHibernateSessionFactoryName() - */ - protected String getHibernateSessionFactoryName() - { - return "coreSessionFactory"; - } - } Index: lams_common/test/java/org/lamsfoundation/lams/learningdesign/TestGateActivityStrategy.java =================================================================== RCS file: /usr/local/cvsroot/lams_common/test/java/org/lamsfoundation/lams/learningdesign/Attic/TestGateActivityStrategy.java,v diff -u -r1.2 -r1.3 --- lams_common/test/java/org/lamsfoundation/lams/learningdesign/TestGateActivityStrategy.java 6 Apr 2005 23:34:00 -0000 1.2 +++ lams_common/test/java/org/lamsfoundation/lams/learningdesign/TestGateActivityStrategy.java 30 Aug 2005 04:37:18 -0000 1.3 @@ -54,19 +54,13 @@ private static final int NUM_OF_TEST_USERS = 5; private static final int TEST_USER_ID = 1; - /* - * @see AbstractLamsTestCase#setUp() - */ protected void setUp() throws Exception { //initialize lesson users for(int i =0; i * View Source *

* * @author Fei Yang */ -public class OrganisationDAOTest extends AbstractLamsTestCase { +public class OrganisationDAOTest extends AbstractCommonTestCase { private Organisation organisation = null; private OrganisationDAO organisationDAO = null; @@ -38,11 +51,5 @@ organisation = organisationDAO.getOrganisationByWorkspaceID(new Integer(1)); assertNotNull(organisation.getOrganisationId()); } - protected String[] getContextConfigLocation() { - return new String[] {"org/lamsfoundation/lams/applicationContext.xml"}; - } - protected String getHibernateSessionFactoryName() { - return "coreSessionFactory"; - } } Index: lams_common/test/java/org/lamsfoundation/lams/usermanagement/dao/hibernate/OrganisationTypeDAOTest.java =================================================================== RCS file: /usr/local/cvsroot/lams_common/test/java/org/lamsfoundation/lams/usermanagement/dao/hibernate/Attic/OrganisationTypeDAOTest.java,v diff -u -r1.3 -r1.4 --- lams_common/test/java/org/lamsfoundation/lams/usermanagement/dao/hibernate/OrganisationTypeDAOTest.java 10 May 2005 23:54:56 -0000 1.3 +++ lams_common/test/java/org/lamsfoundation/lams/usermanagement/dao/hibernate/OrganisationTypeDAOTest.java 30 Aug 2005 04:37:18 -0000 1.4 @@ -1,26 +1,39 @@ -/* - * Created on Nov 26, 2004 - * - * Last modified on Nov 26, 2004 - */ +/* +Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +USA + +http://www.gnu.org/licenses/gpl.txt +*/ package org.lamsfoundation.lams.usermanagement.dao.hibernate; -import org.springframework.context.ApplicationContext; -import org.lamsfoundation.lams.AbstractLamsTestCase; +import org.lamsfoundation.lams.test.AbstractCommonTestCase; import org.lamsfoundation.lams.usermanagement.OrganisationType; +import org.springframework.context.ApplicationContext; /** - * TODO Add description here - * *

* View Source *

* * @author Fei Yang */ -public class OrganisationTypeDAOTest extends AbstractLamsTestCase{ +public class OrganisationTypeDAOTest extends AbstractCommonTestCase{ private OrganisationType organisationType = null; private String errorMessage = ""; private OrganisationTypeDAO organisationTypeDAO = null; @@ -43,13 +56,7 @@ organisationTypeDAO.saveOrganisationType(organisationType); assertNotNull(organisationTypeDAO.getOrganisationTypeByName("TEST")); } - /** - * @see org.lamsfoundation.lams.AbstractLamsTestCase#getContextConfigLocation() - */ - protected String[] getContextConfigLocation() - { - return new String[] {"org/lamsfoundation/lams/applicationContext.xml"}; - } + public void testGetOrganisationTypeById(){ errorMessage = "The name of the organisationType gotten by Id 1 is not ROOT ORGANISATION"; organisationType = organisationTypeDAO.getOrganisationTypeById(new Integer(1)); @@ -68,12 +75,5 @@ organisationTypeDAO.deleteOrganisationType(organisationType); assertNull(organisationTypeDAO.getOrganisationTypeByName("TEST")); } - /** - * @see org.lamsfoundation.lams.AbstractLamsTestCase#getHibernateSessionFactoryName() - */ - protected String getHibernateSessionFactoryName() - { - return "coreSessionFactory"; - } } Index: lams_common/test/java/org/lamsfoundation/lams/usermanagement/dao/hibernate/RoleDAOTest.java =================================================================== RCS file: /usr/local/cvsroot/lams_common/test/java/org/lamsfoundation/lams/usermanagement/dao/hibernate/Attic/RoleDAOTest.java,v diff -u -r1.3 -r1.4 --- lams_common/test/java/org/lamsfoundation/lams/usermanagement/dao/hibernate/RoleDAOTest.java 10 May 2005 23:54:56 -0000 1.3 +++ lams_common/test/java/org/lamsfoundation/lams/usermanagement/dao/hibernate/RoleDAOTest.java 30 Aug 2005 04:37:18 -0000 1.4 @@ -1,24 +1,37 @@ -/* - * Created on Nov 26, 2004 - * - * Last modified on Nov 26, 2004 - */ +/* +Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +USA + +http://www.gnu.org/licenses/gpl.txt +*/ package org.lamsfoundation.lams.usermanagement.dao.hibernate; -import org.springframework.context.ApplicationContext; -import org.lamsfoundation.lams.AbstractLamsTestCase; +import org.lamsfoundation.lams.test.AbstractCommonTestCase; import org.lamsfoundation.lams.usermanagement.Role; +import org.springframework.context.ApplicationContext; /** - * TODO Add description here - * *

* View Source *

* * @author Fei Yang */ -public class RoleDAOTest extends AbstractLamsTestCase { +public class RoleDAOTest extends AbstractCommonTestCase { private Role role = null; private String errorMessage = ""; @@ -52,18 +65,4 @@ role = roleDAO.getRoleByName("SYSADMIN"); assertEquals(errorMessage,new Integer(1),role.getRoleId()); } - /** - * @see org.lamsfoundation.lams.AbstractLamsTestCase#getHibernateSessionFactoryName() - */ - protected String getHibernateSessionFactoryName() - { - return "coreSessionFactory"; - } - /** - * @see org.lamsfoundation.lams.AbstractLamsTestCase#getContextConfigLocation() - */ - protected String[] getContextConfigLocation() - { - return new String[] {"org/lamsfoundation/lams/applicationContext.xml"}; - } } Index: lams_common/test/java/org/lamsfoundation/lams/usermanagement/dao/hibernate/TestUserOrganisationDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_common/test/java/org/lamsfoundation/lams/usermanagement/dao/hibernate/Attic/TestUserOrganisationDAO.java,v diff -u -r1.1 -r1.2 --- lams_common/test/java/org/lamsfoundation/lams/usermanagement/dao/hibernate/TestUserOrganisationDAO.java 28 May 2005 03:44:37 -0000 1.1 +++ lams_common/test/java/org/lamsfoundation/lams/usermanagement/dao/hibernate/TestUserOrganisationDAO.java 30 Aug 2005 04:37:18 -0000 1.2 @@ -1,19 +1,33 @@ -/* - * Created on May 28, 2005 - * - * TODO To change the template for this generated file go to - * Window - Preferences - Java - Code Style - Code Templates - */ +/* +Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +USA + +http://www.gnu.org/licenses/gpl.txt +*/ package org.lamsfoundation.lams.usermanagement.dao.hibernate; import java.util.List; -import org.lamsfoundation.lams.AbstractLamsTestCase; +import org.lamsfoundation.lams.test.AbstractCommonTestCase; /** * @author Manpreet Minhas */ -public class TestUserOrganisationDAO extends AbstractLamsTestCase { +public class TestUserOrganisationDAO extends AbstractCommonTestCase { protected UserOrganisationDAO userOrganisationDAO; protected UserDAO userDAO; @@ -27,21 +41,6 @@ userDAO =(UserDAO)context.getBean("userDAO"); } - /** - * (non-Javadoc) - * @see org.lamsfoundation.lams.AbstractLamsTestCase#getContextConfigLocation() - */ - protected String[] getContextConfigLocation() { - return new String[] {"org/lamsfoundation/lams/applicationContext.xml"}; - } - - /** - * (non-Javadoc) - * @see org.lamsfoundation.lams.AbstractLamsTestCase#getHibernateSessionFactoryName() - */ - protected String getHibernateSessionFactoryName() { - return "coreSessionFactory"; - } public void testGetUserOrganisationsByUser(){ List memberships = userOrganisationDAO.getUserOrganisationsByUser(userDAO.getUserById(new Integer(4))); assertEquals(memberships.size(),4); Index: lams_common/test/java/org/lamsfoundation/lams/usermanagement/dao/hibernate/TestWorkspaceDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_common/test/java/org/lamsfoundation/lams/usermanagement/dao/hibernate/Attic/TestWorkspaceDAO.java,v diff -u -r1.4 -r1.5 --- lams_common/test/java/org/lamsfoundation/lams/usermanagement/dao/hibernate/TestWorkspaceDAO.java 17 Jun 2005 01:52:44 -0000 1.4 +++ lams_common/test/java/org/lamsfoundation/lams/usermanagement/dao/hibernate/TestWorkspaceDAO.java 30 Aug 2005 04:37:18 -0000 1.5 @@ -1,34 +1,40 @@ -/* - * Created on Apr 15, 2005 - * - * TODO To change the template for this generated file go to - * Window - Preferences - Java - Code Style - Code Templates - */ +/* +Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +USA + +http://www.gnu.org/licenses/gpl.txt +*/ package org.lamsfoundation.lams.usermanagement.dao.hibernate; -import org.lamsfoundation.lams.AbstractLamsTestCase; +import org.lamsfoundation.lams.test.AbstractCommonTestCase; import org.lamsfoundation.lams.usermanagement.Workspace; import org.lamsfoundation.lams.usermanagement.dao.IWorkspaceDAO; /** * @author Minhas - * - * TODO To change the template for this generated type comment go to - * Window - Preferences - Java - Code Style - Code Templates */ -public class TestWorkspaceDAO extends AbstractLamsTestCase { +public class TestWorkspaceDAO extends AbstractCommonTestCase { protected IWorkspaceDAO workspaceDAO; public TestWorkspaceDAO(String name){ super(name); } - protected String[] getContextConfigLocation() { - return new String[] {"org/lamsfoundation/lams/applicationContext.xml"}; - } - protected String getHibernateSessionFactoryName() { - return "coreSessionFactory"; - } + protected void setUp() throws Exception{ super.setUp(); workspaceDAO =(IWorkspaceDAO)context.getBean("userManagementWorkspaceDAO"); Index: lams_common/test/java/org/lamsfoundation/lams/usermanagement/dao/hibernate/TestWorkspaceFolderDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_common/test/java/org/lamsfoundation/lams/usermanagement/dao/hibernate/Attic/TestWorkspaceFolderDAO.java,v diff -u -r1.1 -r1.2 --- lams_common/test/java/org/lamsfoundation/lams/usermanagement/dao/hibernate/TestWorkspaceFolderDAO.java 28 May 2005 03:43:28 -0000 1.1 +++ lams_common/test/java/org/lamsfoundation/lams/usermanagement/dao/hibernate/TestWorkspaceFolderDAO.java 30 Aug 2005 04:37:18 -0000 1.2 @@ -1,18 +1,32 @@ -/* - * Created on May 28, 2005 - * - * TODO To change the template for this generated file go to - * Window - Preferences - Java - Code Style - Code Templates - */ +/* +Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +USA + +http://www.gnu.org/licenses/gpl.txt +*/ package org.lamsfoundation.lams.usermanagement.dao.hibernate; -import org.lamsfoundation.lams.AbstractLamsTestCase; +import org.lamsfoundation.lams.test.AbstractCommonTestCase; import org.lamsfoundation.lams.usermanagement.WorkspaceFolder; /** * @author Manpreet Minhas */ -public class TestWorkspaceFolderDAO extends AbstractLamsTestCase { +public class TestWorkspaceFolderDAO extends AbstractCommonTestCase { protected WorkspaceFolderDAO workspaceFolderDAO; @@ -24,21 +38,6 @@ workspaceFolderDAO = (WorkspaceFolderDAO)context.getBean("workspaceFolderDAO"); } - /** - * (non-Javadoc) - * @see org.lamsfoundation.lams.AbstractLamsTestCase#getContextConfigLocation() - */ - protected String[] getContextConfigLocation() { - return new String[] {"org/lamsfoundation/lams/applicationContext.xml"}; - } - - /** - * (non-Javadoc) - * @see org.lamsfoundation.lams.AbstractLamsTestCase#getHibernateSessionFactoryName() - */ - protected String getHibernateSessionFactoryName() { - return "coreSessionFactory"; - } public void testGetRunSequencesFolderForUser(){ WorkspaceFolder folder = workspaceFolderDAO.getRunSequencesFolderForUser(new Integer(4)); assertEquals(folder.getWorkspaceFolderId(),new Integer(7)); Index: lams_common/test/java/org/lamsfoundation/lams/usermanagement/dao/hibernate/UserDAOTest.java =================================================================== RCS file: /usr/local/cvsroot/lams_common/test/java/org/lamsfoundation/lams/usermanagement/dao/hibernate/Attic/UserDAOTest.java,v diff -u -r1.6 -r1.7 --- lams_common/test/java/org/lamsfoundation/lams/usermanagement/dao/hibernate/UserDAOTest.java 10 May 2005 23:54:56 -0000 1.6 +++ lams_common/test/java/org/lamsfoundation/lams/usermanagement/dao/hibernate/UserDAOTest.java 30 Aug 2005 04:37:18 -0000 1.7 @@ -1,12 +1,28 @@ -/* - * Created on Nov 22, 2004 - * - * Last modified on Nov 22, 2004 - */ +/* +Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +USA + +http://www.gnu.org/licenses/gpl.txt +*/ package org.lamsfoundation.lams.usermanagement.dao.hibernate; import java.util.Date; -import org.lamsfoundation.lams.AbstractLamsTestCase; + +import org.lamsfoundation.lams.test.AbstractCommonTestCase; import org.lamsfoundation.lams.usermanagement.Organisation; import org.lamsfoundation.lams.usermanagement.Role; import org.lamsfoundation.lams.usermanagement.User; @@ -15,15 +31,13 @@ /** - * TODO Add description here - * *

* View Source *

* * @author Fei Yang */ -public class UserDAOTest extends AbstractLamsTestCase{ +public class UserDAOTest extends AbstractCommonTestCase { private User user = null; private UserDAO userDAO = null; protected RoleDAO roleDAO; @@ -60,9 +74,6 @@ boolean member = user.isMember(organisation); assertTrue(member); } - protected String[] getContextConfigLocation() { - return new String[] {"org/lamsfoundation/lams/applicationContext.xml"}; - } public void testSaveUser(){ User user = new User(); user.setLogin("MiniMinhas"); @@ -90,7 +101,4 @@ userOrganisationRoleDAO.saveUserOrganisationRole(userOrganisationRole); return userOrganisationRole; } - protected String getHibernateSessionFactoryName() { - return "coreSessionFactory"; - } } Index: lams_common/test/web/WEB-INF/.struts-config.mex =================================================================== RCS file: /usr/local/cvsroot/lams_common/test/web/WEB-INF/Attic/.struts-config.mex,v diff -u Binary files differ Fisheye: Tag 1.2 refers to a dead (removed) revision in file `lams_common/test/web/WEB-INF/applicationContext.xml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `lams_common/test/web/WEB-INF/learningDesignApplicationContext.xml'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_common/test/web/WEB-INF/struts-config.xml =================================================================== RCS file: /usr/local/cvsroot/lams_common/test/web/WEB-INF/Attic/struts-config.xml,v diff -u -r1.2 -r1.3 --- lams_common/test/web/WEB-INF/struts-config.xml 10 May 2005 23:56:20 -0000 1.2 +++ lams_common/test/web/WEB-INF/struts-config.xml 30 Aug 2005 04:37:18 -0000 1.3 @@ -214,21 +214,6 @@ redirect="false" /> - - - Index: lams_common/test/web/WEB-INF/web.xml =================================================================== RCS file: /usr/local/cvsroot/lams_common/test/web/WEB-INF/Attic/web.xml,v diff -u -r1.2 -r1.3 --- lams_common/test/web/WEB-INF/web.xml 10 May 2005 23:56:20 -0000 1.2 +++ lams_common/test/web/WEB-INF/web.xml 30 Aug 2005 04:37:18 -0000 1.3 @@ -23,13 +23,17 @@ http://www.gnu.org/licenses/gpl.txt --> - - contextConfigLocation - /WEB-INF/spring/applicationContext.xml - /WEB-INF/spring/learningDesignApplicationContext.xml - /WEB-INF/spring/workspaceApplicationContext.xml - - + + contextConfigLocation + + classpath:/org/lamsfoundation/lams/applicationContext.xml + + + + + org.springframework.web.context.ContextLoaderListener + +