Index: lams_common/test/java/org/lamsfoundation/lams/learningdesign/TestActivity.java
===================================================================
diff -u -r5bd9057d6aa08bfa1bb1e6c240d5b3707743c3d7 -r4eadad01f792238a725b1482fd63e185a86e3b73
--- lams_common/test/java/org/lamsfoundation/lams/learningdesign/TestActivity.java (.../TestActivity.java) (revision 5bd9057d6aa08bfa1bb1e6c240d5b3707743c3d7)
+++ lams_common/test/java/org/lamsfoundation/lams/learningdesign/TestActivity.java (.../TestActivity.java) (revision 4eadad01f792238a725b1482fd63e185a86e3b73)
@@ -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
===================================================================
diff -u -r7c861054fe51b0ee7de9fc48d6aebb67a1f6b82e -r4eadad01f792238a725b1482fd63e185a86e3b73
--- lams_common/test/java/org/lamsfoundation/lams/learningdesign/TestGateActivityStrategy.java (.../TestGateActivityStrategy.java) (revision 7c861054fe51b0ee7de9fc48d6aebb67a1f6b82e)
+++ lams_common/test/java/org/lamsfoundation/lams/learningdesign/TestGateActivityStrategy.java (.../TestGateActivityStrategy.java) (revision 4eadad01f792238a725b1482fd63e185a86e3b73)
@@ -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 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 =================================================================== diff -u -r5bd9057d6aa08bfa1bb1e6c240d5b3707743c3d7 -r4eadad01f792238a725b1482fd63e185a86e3b73 --- lams_common/test/java/org/lamsfoundation/lams/usermanagement/dao/hibernate/RoleDAOTest.java (.../RoleDAOTest.java) (revision 5bd9057d6aa08bfa1bb1e6c240d5b3707743c3d7) +++ lams_common/test/java/org/lamsfoundation/lams/usermanagement/dao/hibernate/RoleDAOTest.java (.../RoleDAOTest.java) (revision 4eadad01f792238a725b1482fd63e185a86e3b73) @@ -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 =================================================================== diff -u -re8dae3d7178a12d09282f26c1c2257728f2fc65a -r4eadad01f792238a725b1482fd63e185a86e3b73 --- lams_common/test/java/org/lamsfoundation/lams/usermanagement/dao/hibernate/TestUserOrganisationDAO.java (.../TestUserOrganisationDAO.java) (revision e8dae3d7178a12d09282f26c1c2257728f2fc65a) +++ lams_common/test/java/org/lamsfoundation/lams/usermanagement/dao/hibernate/TestUserOrganisationDAO.java (.../TestUserOrganisationDAO.java) (revision 4eadad01f792238a725b1482fd63e185a86e3b73) @@ -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 =================================================================== diff -u -r54c07197cd4876147b2180165e0bf238e3f89f23 -r4eadad01f792238a725b1482fd63e185a86e3b73 --- lams_common/test/java/org/lamsfoundation/lams/usermanagement/dao/hibernate/TestWorkspaceDAO.java (.../TestWorkspaceDAO.java) (revision 54c07197cd4876147b2180165e0bf238e3f89f23) +++ lams_common/test/java/org/lamsfoundation/lams/usermanagement/dao/hibernate/TestWorkspaceDAO.java (.../TestWorkspaceDAO.java) (revision 4eadad01f792238a725b1482fd63e185a86e3b73) @@ -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 =================================================================== diff -u -re8dae3d7178a12d09282f26c1c2257728f2fc65a -r4eadad01f792238a725b1482fd63e185a86e3b73 --- lams_common/test/java/org/lamsfoundation/lams/usermanagement/dao/hibernate/TestWorkspaceFolderDAO.java (.../TestWorkspaceFolderDAO.java) (revision e8dae3d7178a12d09282f26c1c2257728f2fc65a) +++ lams_common/test/java/org/lamsfoundation/lams/usermanagement/dao/hibernate/TestWorkspaceFolderDAO.java (.../TestWorkspaceFolderDAO.java) (revision 4eadad01f792238a725b1482fd63e185a86e3b73) @@ -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 =================================================================== diff -u -r5bd9057d6aa08bfa1bb1e6c240d5b3707743c3d7 -r4eadad01f792238a725b1482fd63e185a86e3b73 --- lams_common/test/java/org/lamsfoundation/lams/usermanagement/dao/hibernate/UserDAOTest.java (.../UserDAOTest.java) (revision 5bd9057d6aa08bfa1bb1e6c240d5b3707743c3d7) +++ lams_common/test/java/org/lamsfoundation/lams/usermanagement/dao/hibernate/UserDAOTest.java (.../UserDAOTest.java) (revision 4eadad01f792238a725b1482fd63e185a86e3b73) @@ -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 =================================================================== diff -u --- lams_common/test/web/WEB-INF/.struts-config.mex (revision 0) +++ lams_common/test/web/WEB-INF/.struts-config.mex (revision 4eadad01f792238a725b1482fd63e185a86e3b73) @@ -0,0 +1 @@ +