[jboss-svn-commits] JBL Code SVN: r15548 - in labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-test: src/java/org/jboss/wiki/test and 1 other directory.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Wed Oct 3 12:55:59 EDT 2007
Author: szimano
Date: 2007-10-03 12:55:58 -0400 (Wed, 03 Oct 2007)
New Revision: 15548
Modified:
labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-test/.classpath
labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-test/src/java/org/jboss/wiki/test/WikiTest.java
Log:
test fix with guice
Modified: labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-test/.classpath
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-test/.classpath 2007-10-03 16:43:59 UTC (rev 15547)
+++ labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-test/.classpath 2007-10-03 16:55:58 UTC (rev 15548)
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<classpath>
+ <classpathentry excluding="" kind="src" path="src/java">
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
+ </classpathentry>
+ <classpathentry kind="var" path="MAVEN_REPO/log4j/jars/log4j-1.2.9.jar">
+ </classpathentry>
+ <classpathentry kind="var" path="MAVEN_REPO/wiki-common/jars/wiki-common.jar">
+ </classpathentry>
+ <classpathentry kind="var" path="MAVEN_REPO/jboss/jars/javax.servlet.jar">
+ </classpathentry>
+ <classpathentry kind="var" path="MAVEN_REPO/jboss/jars/javax.servlet.jsp.jar">
+ </classpathentry>
+ <classpathentry kind="var" path="MAVEN_REPO/junit/jars/junit-3.8.1.jar">
+ </classpathentry>
+ <classpathentry kind="var" path="MAVEN_REPO/jboss/jars/activation.jar">
+ </classpathentry>
+ <classpathentry kind="var" path="MAVEN_REPO/commons-fileupload/jars/commons-fileupload-1.0.jar">
+ </classpathentry>
+ <classpathentry kind="var" path="MAVEN_REPO/commons-configuration/jars/commons-configuration-1.1.jar">
+ </classpathentry>
+ <classpathentry kind="var" path="MAVEN_REPO/commons-lang/jars/commons-lang-2.1.jar">
+ </classpathentry>
+ <classpathentry kind="var" path="MAVEN_REPO/commons-collections/jars/commons-collections-3.1.jar">
+ </classpathentry>
+ <classpathentry kind="var" path="MAVEN_REPO/dom4j/jars/dom4j-1.6.jar">
+ </classpathentry>
+ <classpathentry kind="var" path="MAVEN_REPO/jdom/jars/jdom-1.0.jar">
+ </classpathentry>
+ <classpathentry kind="var" path="MAVEN_REPO/jboss/jars/jboss-ejb3x.jar">
+ </classpathentry>
+ <classpathentry kind="var" path="MAVEN_REPO/jboss/jars/jboss-ejb3.jar">
+ </classpathentry>
+ <classpathentry kind="var" path="MAVEN_REPO/portlet-api/jars/portlet-api-1.0.jar">
+ </classpathentry>
+ <classpathentry kind="var" path="MAVEN_REPO/jboss/jars/jboss-jmx.jar">
+ </classpathentry>
+ <classpathentry kind="var" path="MAVEN_REPO/jboss/jars/jboss-common.jar">
+ </classpathentry>
+ <classpathentry kind="var" path="MAVEN_REPO/jboss/jars/portal-common-lib.jar">
+ </classpathentry>
+ <classpathentry kind="var" path="MAVEN_REPO/jboss/jars/portal-core-lib.jar">
+ </classpathentry>
+ <classpathentry kind="var" path="MAVEN_REPO/jboss/jars/portal-portlet-lib.jar">
+ </classpathentry>
+ <classpathentry kind="var" path="MAVEN_REPO/jboss/jars/jbossall-client-3.2.3.jar">
+ </classpathentry>
+ <classpathentry kind="lib" path="/Users/tomek/java/sandbox/portal-extensions/shotoku/shotoku-base/target/shotoku-base.jar">
+ </classpathentry>
+ <classpathentry kind="lib" path="/Users/tomek/java/sandbox/portal-extensions/shotoku/shotoku-aop/target/shotoku-aop.jar">
+ </classpathentry>
+ <classpathentry kind="var" path="MAVEN_REPO/guice/jars/guice-1.0.jar">
+ </classpathentry>
+ <classpathentry kind="output" path="target/classes">
+ </classpathentry>
+</classpath>
\ No newline at end of file
Modified: labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-test/src/java/org/jboss/wiki/test/WikiTest.java
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-test/src/java/org/jboss/wiki/test/WikiTest.java 2007-10-03 16:43:59 UTC (rev 15547)
+++ labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-test/src/java/org/jboss/wiki/test/WikiTest.java 2007-10-03 16:55:58 UTC (rev 15548)
@@ -44,8 +44,11 @@
import org.jboss.wiki.exceptions.WikiException;
import org.jboss.wiki.exceptions.WikiManagementNotFoundException;
import org.jboss.wiki.management.WikiServiceManagement;
+import org.jboss.wiki.test.guice.TestWikiModule;
+import com.google.inject.Guice;
import com.google.inject.Inject;
+import com.google.inject.Injector;
public class WikiTest extends TestCase {
protected WikiEngine wikiEngine;
@@ -86,12 +89,8 @@
protected Logger log;
+ private static Injector injector = Guice.createInjector(new TestWikiModule());
- @Inject
- public void setWikiEngine(WikiEngine wikiEngine) {
- this.wikiEngine = wikiEngine;
- }
-
@Override
protected void setUp() throws Exception {
log = Logger.getLogger(WikiTest.class);
@@ -106,6 +105,8 @@
log.info("Couldn't find WikiManagement - probably u're executing tests outside AS");
wikiEngine = new WikiEngine();
}*/
+
+ wikiEngine = injector.getInstance(WikiEngine.class);
testWikiSession = new TestWikiSession();
pagesToDelete = new HashSet<String>();
More information about the jboss-svn-commits
mailing list