[jboss-cvs] JBossAS SVN: r81228 - in projects/jboss-deployers/trunk/deployers-vfs/src/test: java/org/jboss/test/deployers/vfs/webbeans and 25 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Nov 18 10:19:54 EST 2008
Author: alesj
Date: 2008-11-18 10:19:54 -0500 (Tue, 18 Nov 2008)
New Revision: 81228
Added:
projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/
projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/WebBeansTestSuite.java
projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/support/
projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/support/WebBeanDiscovery.java
projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/support/ejb/
projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/support/ejb/BusinessInterface.java
projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/support/ejb/MySLSBean.java
projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/support/ext/
projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/support/ext/ExternalWebBean.java
projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/support/jar/
projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/support/jar/PlainJavaBean.java
projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/support/ui/
projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/support/ui/UIWebBean.java
projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/support/util/
projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/support/util/SomeUtil.java
projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/support/web/
projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/support/web/ServletWebBean.java
projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/test/
projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/test/AbstractWebBeansTest.java
projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/test/WebBeanDiscoveryTestCase.java
projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/org/jboss/test/deployers/vfs/webbeans/
projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/org/jboss/test/deployers/vfs/webbeans/test/
projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/org/jboss/test/deployers/vfs/webbeans/test/WebBeanDiscoveryTestCase.xml
projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/webbeans/
projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/webbeans/simple/
projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/webbeans/simple/META-INF/
projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/webbeans/simple/META-INF/application.properties
projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/webbeans/simple/ejb/
projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/webbeans/simple/ejb/META-INF/
projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/webbeans/simple/ejb/META-INF/MANIFEST.MF
projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/webbeans/simple/ejb/META-INF/ejb-jar.xml
projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/webbeans/simple/ejb/META-INF/web-beans.xml
projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/webbeans/simple/ext/
projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/webbeans/simple/ext/META-INF/
projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/webbeans/simple/ext/META-INF/MANIFEST.MF
projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/webbeans/simple/ext/META-INF/web-beans.xml
projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/webbeans/simple/jar/
projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/webbeans/simple/jar/META-INF/
projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/webbeans/simple/jar/META-INF/MANIFEST.MF
projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/webbeans/simple/jar/META-INF/web-beans.xml
projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/webbeans/simple/ui/
projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/webbeans/simple/ui/META-INF/
projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/webbeans/simple/ui/META-INF/MANIFEST.MF
projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/webbeans/simple/ui/META-INF/web-beans.xml
projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/webbeans/simple/web/
projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/webbeans/simple/web/WEB-INF/
projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/webbeans/simple/web/WEB-INF/web-beans.xml
projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/webbeans/simple/web/WEB-INF/web.xml
Log:
Initial webbeans mock tests.
Added: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/WebBeansTestSuite.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/WebBeansTestSuite.java (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/WebBeansTestSuite.java 2008-11-18 15:19:54 UTC (rev 81228)
@@ -0,0 +1,49 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.deployers.vfs.webbeans;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+import org.jboss.test.deployers.vfs.webbeans.test.WebBeanDiscoveryTestCase;
+
+/**
+ * WebBeans features test suite.
+ *
+ * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ */
+public class WebBeansTestSuite extends TestSuite
+{
+ public static void main(String[] args)
+ {
+ TestRunner.run(suite());
+ }
+
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite("VFS WebBeans Tests");
+
+ suite.addTest(WebBeanDiscoveryTestCase.suite());
+
+ return suite;
+ }
+}
\ No newline at end of file
Added: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/support/WebBeanDiscovery.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/support/WebBeanDiscovery.java (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/support/WebBeanDiscovery.java 2008-11-18 15:19:54 UTC (rev 81228)
@@ -0,0 +1,45 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.deployers.vfs.webbeans.support;
+
+import java.net.URL;
+
+/**
+ * A container should implement this interface to allow the Web Beans RI to
+ * discover the Web Beans to deploy
+ *
+ * @author Pete Muir
+ * @author Ales Justin
+ *
+ */
+public interface WebBeanDiscovery
+{
+ /**
+ * @return A list of all classes in classpath archives with web-beans.xml files
+ */
+ public Iterable<Class<?>> discoverWebBeanClasses();
+
+ /**
+ * @return A list of all web-beans.xml files in the app classpath
+ */
+ public Iterable<URL> discoverWebBeansXml();
+}
\ No newline at end of file
Added: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/support/ejb/BusinessInterface.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/support/ejb/BusinessInterface.java (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/support/ejb/BusinessInterface.java 2008-11-18 15:19:54 UTC (rev 81228)
@@ -0,0 +1,30 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.deployers.vfs.webbeans.support.ejb;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ */
+public interface BusinessInterface
+{
+ int add(int x, int y);
+}
Added: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/support/ejb/MySLSBean.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/support/ejb/MySLSBean.java (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/support/ejb/MySLSBean.java 2008-11-18 15:19:54 UTC (rev 81228)
@@ -0,0 +1,33 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.deployers.vfs.webbeans.support.ejb;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ */
+public class MySLSBean implements BusinessInterface
+{
+ public int add(int x, int y)
+ {
+ return x + y;
+ }
+}
Added: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/support/ext/ExternalWebBean.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/support/ext/ExternalWebBean.java (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/support/ext/ExternalWebBean.java 2008-11-18 15:19:54 UTC (rev 81228)
@@ -0,0 +1,29 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.deployers.vfs.webbeans.support.ext;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ */
+public class ExternalWebBean
+{
+}
Added: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/support/jar/PlainJavaBean.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/support/jar/PlainJavaBean.java (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/support/jar/PlainJavaBean.java 2008-11-18 15:19:54 UTC (rev 81228)
@@ -0,0 +1,29 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.deployers.vfs.webbeans.support.jar;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ */
+public class PlainJavaBean
+{
+}
Added: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/support/ui/UIWebBean.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/support/ui/UIWebBean.java (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/support/ui/UIWebBean.java 2008-11-18 15:19:54 UTC (rev 81228)
@@ -0,0 +1,29 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.deployers.vfs.webbeans.support.ui;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ */
+public class UIWebBean
+{
+}
Added: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/support/util/SomeUtil.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/support/util/SomeUtil.java (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/support/util/SomeUtil.java 2008-11-18 15:19:54 UTC (rev 81228)
@@ -0,0 +1,29 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.deployers.vfs.webbeans.support.util;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ */
+public class SomeUtil
+{
+}
Added: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/support/web/ServletWebBean.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/support/web/ServletWebBean.java (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/support/web/ServletWebBean.java 2008-11-18 15:19:54 UTC (rev 81228)
@@ -0,0 +1,29 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.deployers.vfs.webbeans.support.web;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ */
+public class ServletWebBean
+{
+}
Added: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/test/AbstractWebBeansTest.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/test/AbstractWebBeansTest.java (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/test/AbstractWebBeansTest.java 2008-11-18 15:19:54 UTC (rev 81228)
@@ -0,0 +1,102 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.deployers.vfs.webbeans.test;
+
+import org.jboss.test.deployers.BootstrapDeployersTest;
+import org.jboss.test.deployers.vfs.webbeans.support.ejb.MySLSBean;
+import org.jboss.test.deployers.vfs.webbeans.support.ext.ExternalWebBean;
+import org.jboss.test.deployers.vfs.webbeans.support.jar.PlainJavaBean;
+import org.jboss.test.deployers.vfs.webbeans.support.ui.UIWebBean;
+import org.jboss.test.deployers.vfs.webbeans.support.util.SomeUtil;
+import org.jboss.test.deployers.vfs.webbeans.support.web.ServletWebBean;
+import org.jboss.virtual.AssembledDirectory;
+import org.jboss.deployers.vfs.deployer.kernel.BeanDeployer;
+
+/**
+ * AbstractWebBeansTest.
+ *
+ * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ */
+public abstract class AbstractWebBeansTest extends BootstrapDeployersTest
+{
+ protected AbstractWebBeansTest(String name)
+ {
+ super(name);
+ }
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+
+ // fix bean deployer to take more restictive suffix
+ // else it's gonna pick up our web-beans.xml
+ BeanDeployer deployer = assertBean("BeanDeployer", BeanDeployer.class);
+ deployer.setSuffix("-jboss-beans.xml");
+ }
+
+ protected AssembledDirectory createBasicEar() throws Exception
+ {
+ AssembledDirectory ear = createTopLevelWithUtil();
+
+ AssembledDirectory jar = ear.mkdir("simple.jar");
+ addPackage(jar, PlainJavaBean.class);
+ addPath(jar, "/webbeans/simple/jar", "META-INF");
+
+ AssembledDirectory ejbs = ear.mkdir("ejbs.jar");
+ addPackage(ejbs, MySLSBean.class);
+ addPath(ejbs, "/webbeans/simple/ejb", "META-INF");
+
+ AssembledDirectory war = ear.mkdir("simple.war");
+ AssembledDirectory webinf = war.mkdir("WEB-INF");
+ AssembledDirectory classes = webinf.mkdir("classes");
+ addPackage(classes, ServletWebBean.class);
+ addPath(war, "/webbeans/simple/web", "WEB-INF");
+
+ AssembledDirectory lib = webinf.mkdir("lib");
+
+ AssembledDirectory uijar = lib.mkdir("ui.jar");
+ addPackage(uijar, UIWebBean.class);
+ addPath(uijar, "/webbeans/simple/ui", "META-INF");
+
+ enableTrace("org.jboss.deployers");
+
+ return ear;
+ }
+
+ protected AssembledDirectory createTopLevelWithUtil() throws Exception
+ {
+ AssembledDirectory topLevel = createAssembledDirectory("top-level.ear", "top-level.ear");
+ addPath(topLevel, "/webbeans/simple", "META-INF");
+
+ AssembledDirectory earLib = topLevel.mkdir("lib");
+
+ AssembledDirectory util = earLib.mkdir("util.jar");
+ addPackage(util, SomeUtil.class);
+
+ AssembledDirectory ext = earLib.mkdir("ext.jar");
+ addPackage(ext, ExternalWebBean.class);
+ addPath(ext, "/webbeans/simple/ext", "META-INF");
+
+ return topLevel;
+ }
+}
\ No newline at end of file
Added: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/test/WebBeanDiscoveryTestCase.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/test/WebBeanDiscoveryTestCase.java (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/test/WebBeanDiscoveryTestCase.java 2008-11-18 15:19:54 UTC (rev 81228)
@@ -0,0 +1,58 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.deployers.vfs.webbeans.test;
+
+import junit.framework.Test;
+import org.jboss.virtual.VirtualFile;
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
+
+/**
+ * WebBeanDiscoveryTestCase.
+ *
+ * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ */
+public class WebBeanDiscoveryTestCase extends AbstractWebBeansTest
+{
+ public WebBeanDiscoveryTestCase(String name)
+ {
+ super(name);
+ }
+
+ public static Test suite()
+ {
+ return suite(WebBeanDiscoveryTestCase.class);
+ }
+
+ public void testSimpleUsage() throws Exception
+ {
+ VirtualFile ear = createBasicEar();
+ VFSDeploymentUnit topUnit = assertDeploy(ear);
+ try
+ {
+ getLog().debug(topUnit);
+ }
+ finally
+ {
+ undeploy(topUnit);
+ }
+ }
+}
Added: projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/org/jboss/test/deployers/vfs/webbeans/test/WebBeanDiscoveryTestCase.xml
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/org/jboss/test/deployers/vfs/webbeans/test/WebBeanDiscoveryTestCase.xml (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/org/jboss/test/deployers/vfs/webbeans/test/WebBeanDiscoveryTestCase.xml 2008-11-18 15:19:54 UTC (rev 81228)
@@ -0,0 +1,6 @@
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="EarStructure" class="org.jboss.test.deployers.vfs.structure.ear.support.MockEarStructureDeployer"/>
+ <bean name="WarStructure" class="org.jboss.deployers.vfs.plugins.structure.war.WARStructure"/>
+
+</deployment>
Added: projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/webbeans/simple/META-INF/application.properties
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/webbeans/simple/META-INF/application.properties (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/webbeans/simple/META-INF/application.properties 2008-11-18 15:19:54 UTC (rev 81228)
@@ -0,0 +1,2 @@
+jar-module=simple.jar
+web-module=simple.war
Added: projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/webbeans/simple/ejb/META-INF/MANIFEST.MF
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/webbeans/simple/ejb/META-INF/MANIFEST.MF (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/webbeans/simple/ejb/META-INF/MANIFEST.MF 2008-11-18 15:19:54 UTC (rev 81228)
@@ -0,0 +1,2 @@
+Manifest-Version: 1.0
+Created-By: hand
Added: projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/webbeans/simple/ejb/META-INF/ejb-jar.xml
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/webbeans/simple/ejb/META-INF/ejb-jar.xml (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/webbeans/simple/ejb/META-INF/ejb-jar.xml 2008-11-18 15:19:54 UTC (rev 81228)
@@ -0,0 +1,2 @@
+<ejb-jar>
+</ejb-jar>
\ No newline at end of file
Added: projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/webbeans/simple/ejb/META-INF/web-beans.xml
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/webbeans/simple/ejb/META-INF/web-beans.xml (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/webbeans/simple/ejb/META-INF/web-beans.xml 2008-11-18 15:19:54 UTC (rev 81228)
@@ -0,0 +1,2 @@
+<web-beans>
+</web-beans>
\ No newline at end of file
Added: projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/webbeans/simple/ext/META-INF/MANIFEST.MF
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/webbeans/simple/ext/META-INF/MANIFEST.MF (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/webbeans/simple/ext/META-INF/MANIFEST.MF 2008-11-18 15:19:54 UTC (rev 81228)
@@ -0,0 +1,2 @@
+Manifest-Version: 1.0
+Created-By: hand
Added: projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/webbeans/simple/ext/META-INF/web-beans.xml
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/webbeans/simple/ext/META-INF/web-beans.xml (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/webbeans/simple/ext/META-INF/web-beans.xml 2008-11-18 15:19:54 UTC (rev 81228)
@@ -0,0 +1,2 @@
+<web-beans>
+</web-beans>
\ No newline at end of file
Added: projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/webbeans/simple/jar/META-INF/MANIFEST.MF
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/webbeans/simple/jar/META-INF/MANIFEST.MF (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/webbeans/simple/jar/META-INF/MANIFEST.MF 2008-11-18 15:19:54 UTC (rev 81228)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Created-By: hand
+Class-Path: lib/util.jar, lib/ext.jar
Added: projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/webbeans/simple/jar/META-INF/web-beans.xml
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/webbeans/simple/jar/META-INF/web-beans.xml (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/webbeans/simple/jar/META-INF/web-beans.xml 2008-11-18 15:19:54 UTC (rev 81228)
@@ -0,0 +1,2 @@
+<web-beans>
+</web-beans>
\ No newline at end of file
Added: projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/webbeans/simple/ui/META-INF/MANIFEST.MF
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/webbeans/simple/ui/META-INF/MANIFEST.MF (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/webbeans/simple/ui/META-INF/MANIFEST.MF 2008-11-18 15:19:54 UTC (rev 81228)
@@ -0,0 +1,2 @@
+Manifest-Version: 1.0
+Created-By: hand
Added: projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/webbeans/simple/ui/META-INF/web-beans.xml
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/webbeans/simple/ui/META-INF/web-beans.xml (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/webbeans/simple/ui/META-INF/web-beans.xml 2008-11-18 15:19:54 UTC (rev 81228)
@@ -0,0 +1,2 @@
+<web-beans>
+</web-beans>
\ No newline at end of file
Added: projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/webbeans/simple/web/WEB-INF/web-beans.xml
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/webbeans/simple/web/WEB-INF/web-beans.xml (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/webbeans/simple/web/WEB-INF/web-beans.xml 2008-11-18 15:19:54 UTC (rev 81228)
@@ -0,0 +1,2 @@
+<web-beans>
+</web-beans>
\ No newline at end of file
Added: projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/webbeans/simple/web/WEB-INF/web.xml
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/webbeans/simple/web/WEB-INF/web.xml (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/webbeans/simple/web/WEB-INF/web.xml 2008-11-18 15:19:54 UTC (rev 81228)
@@ -0,0 +1,2 @@
+<web>
+</web>
\ No newline at end of file
More information about the jboss-cvs-commits
mailing list