Author: sohil.shah(a)jboss.com
Date: 2007-02-06 15:44:08 -0500 (Tue, 06 Feb 2007)
New Revision: 6178
Modified:
trunk/cms/build.xml
trunk/cms/src/main/org/jboss/portal/test/cms/TestRepositoryBootStrap.java
Log:
fixing this test case to do proper cleanup
Modified: trunk/cms/build.xml
===================================================================
--- trunk/cms/build.xml 2007-02-06 20:14:01 UTC (rev 6177)
+++ trunk/cms/build.xml 2007-02-06 20:44:08 UTC (rev 6178)
@@ -456,6 +456,8 @@
<target name="reports" depends="init">
<mkdir dir="${build.reports}"/>
+ <mkdir dir="${build.reports}/html"/>
+ <property name="test.reports"
value="${module.output}/tests"/>
<junitreport todir="${build.reports}">
<fileset dir="${test.reports}">
<include name="TEST-*.xml"/>
@@ -463,4 +465,5 @@
<report format="frames"
todir="${build.reports}/html"/>
</junitreport>
</target>
+
</project>
Modified: trunk/cms/src/main/org/jboss/portal/test/cms/TestRepositoryBootStrap.java
===================================================================
--- trunk/cms/src/main/org/jboss/portal/test/cms/TestRepositoryBootStrap.java 2007-02-06
20:14:01 UTC (rev 6177)
+++ trunk/cms/src/main/org/jboss/portal/test/cms/TestRepositoryBootStrap.java 2007-02-06
20:44:08 UTC (rev 6178)
@@ -23,55 +23,26 @@
package org.jboss.portal.test.cms;
import junit.framework.TestSuite;
-import org.jboss.portal.cms.impl.jcr.JCRCMS;
import org.jboss.portal.cms.util.RepositoryUtil;
-import org.jboss.portal.common.util.CLLoader;
-import org.jboss.portal.common.util.LoaderResource;
-import org.jboss.portal.common.util.XML;
import javax.jcr.Session;
-import java.util.Locale;
-import java.util.Map;
+import org.jboss.portal.test.cms.commands.AbstractCommandTestCase;
+
/**
* Tests JCRCMS Service
*
* @author Roy Russo : roy at jboss dot org
*/
-public class TestRepositoryBootStrap extends AbstractCMSTestCase
+public class TestRepositoryBootStrap extends AbstractCommandTestCase
{
public TestRepositoryBootStrap()
{
}
- private JCRCMS service;
-
- public void setUp() throws Exception
- {
- super.setUp();
- LoaderResource res = new CLLoader().getResource("jcr/repository.xml");
-
- service = new JCRCMS();
- service.setDoChecking(true);
- service.setDefaultLocale(Locale.ENGLISH.getDisplayName());
- service.setDefaultContentLocation("default-content/default");
-
-
service.setConfig(res.asDocument(XML.getDocumentBuilderFactory().newDocumentBuilder()).getDocumentElement());
- service.setRepositoryName("repo");
- service.setHomeDir("repo");
- service.start();
- }
-
- public void tearDown() throws Exception
- {
- service.stop();
- }
-
public void testService() throws Exception
{
- service.createContent();
-
assertTrue(service.contentExists());
Session session = RepositoryUtil.login(service.getRepository(), "anonid",
"");
assertTrue("Default folder does not exist.",
session.itemExists("/default"));
Show replies by date