[jboss-cvs] JBossAS SVN: r71637 - in projects/microcontainer/trunk/aop-mc-int/src: resources/tests/org/jboss/test/microcontainer/test and 2 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Apr 2 17:13:30 EDT 2008
Author: kabir.khan at jboss.com
Date: 2008-04-02 17:13:30 -0400 (Wed, 02 Apr 2008)
New Revision: 71637
Added:
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/FieldAccessTestCase.xml
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/test/FieldAccessTestCase.java
Removed:
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/FieldAccessTestCase.xml
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/FieldAccessTestCase.java
Log:
Deleted: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/FieldAccessTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/FieldAccessTestCase.xml 2008-04-02 21:05:21 UTC (rev 71636)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/FieldAccessTestCase.xml 2008-04-02 21:13:30 UTC (rev 71637)
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<deployment xmlns="urn:jboss:bean-deployer:2.0">
-
- <bean name="AspectManager" class="org.jboss.aop.AspectManager">
- <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
- </bean>
-
- <interceptor xmlns="urn:jboss:aop-beans:1.0" class="org.jboss.test.microcontainer.beans.TestInterceptor"/>
-
- <bind xmlns="urn:jboss:aop-beans:1.0" pointcut="execution(* org.jboss.test.microcontainer.beans.support.AccessBean->*(..))">
- <interceptor-ref name="org.jboss.test.microcontainer.beans.TestInterceptor"/>
- </bind>
-
- <bean name="private" class="org.jboss.test.microcontainer.beans.support.AccessBean" access-mode="ALL">
- <property name="priString">foobar</property>
- </bean>
-
- <bean name="protected" class="org.jboss.test.microcontainer.beans.support.AccessBean" access-mode="ALL">
- <property name="protString">foobar</property>
- </bean>
-
- <bean name="public" class="org.jboss.test.microcontainer.beans.support.AccessBean" access-mode="ALL">
- <property name="pubString">foobar</property>
- </bean>
-
-</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/FieldAccessTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/FieldAccessTestCase.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/FieldAccessTestCase.xml 2008-04-02 21:13:30 UTC (rev 71637)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="AspectManager" class="org.jboss.aop.AspectManager">
+ <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
+ </bean>
+
+ <interceptor xmlns="urn:jboss:aop-beans:1.0" class="org.jboss.test.microcontainer.beans.TestInterceptor"/>
+
+ <bind xmlns="urn:jboss:aop-beans:1.0" pointcut="execution(* org.jboss.test.microcontainer.beans.support.AccessBean->*(..))">
+ <interceptor-ref name="org.jboss.test.microcontainer.beans.TestInterceptor"/>
+ </bind>
+
+ <bean name="private" class="org.jboss.test.microcontainer.beans.support.AccessBean" access-mode="ALL">
+ <property name="priString">foobar</property>
+ </bean>
+
+ <bean name="protected" class="org.jboss.test.microcontainer.beans.support.AccessBean" access-mode="ALL">
+ <property name="protString">foobar</property>
+ </bean>
+
+ <bean name="public" class="org.jboss.test.microcontainer.beans.support.AccessBean" access-mode="ALL">
+ <property name="pubString">foobar</property>
+ </bean>
+
+</deployment>
Deleted: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/FieldAccessTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/FieldAccessTestCase.java 2008-04-02 21:05:21 UTC (rev 71636)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/FieldAccessTestCase.java 2008-04-02 21:13:30 UTC (rev 71637)
@@ -1,86 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt 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.microcontainer.beans.test;
-
-import junit.framework.Test;
-import org.jboss.test.aop.junit.AbstractTypeTest;
-import org.jboss.test.aop.junit.AbstractTypeTestDelegate;
-import org.jboss.test.microcontainer.beans.support.AccessBean;
-
-/**
- * AOP field test case.
- *
- * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
- */
-public class FieldAccessTestCase extends AbstractTypeTest
-{
- public FieldAccessTestCase(String name)
- {
- super(name);
- }
-
- public static Test suite()
- {
- return suite(FieldAccessTestCase.class);
- }
-
- protected void testAccessBean(String name) throws Throwable
- {
- AccessBean bean = getBean(name, AccessBean.class);
- AbstractTypeTestDelegate.Type type = getType(name);
- if (type == AbstractTypeTestDelegate.Type.PROXY)
- {
- assertNull(bean.getPriString());
- assertNull(bean.getProtString());
- assertNull(bean.getPubString());
- }
- else
- {
- assertEquals("foobar", concat(bean));
- }
- }
-
- private String concat(AccessBean bean)
- {
- String string = "";
- if (bean.getPriString() != null)
- string += bean.getPriString();
- if (bean.getProtString() != null)
- string += bean.getProtString();
- if (bean.getPubString() != null)
- string += bean.getPubString();
- return string;
- }
-
- public void testFieldAccess() throws Throwable
- {
- testAccessBean("private");
- testAccessBean("protected");
- testAccessBean("public");
-
- // this should fail or something :-) on proxy
- AccessBean pb = getBean("public", AccessBean.class);
- assertEquals("foobar", pb.pubString);
- AbstractTypeTestDelegate.Type type = getType("public");
- assertTrue(pb.getPubString() == null || type != AbstractTypeTestDelegate.Type.PROXY);
- }
-}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/test/FieldAccessTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/test/FieldAccessTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/test/FieldAccessTestCase.java 2008-04-02 21:13:30 UTC (rev 71637)
@@ -0,0 +1,86 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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.microcontainer.test;
+
+import junit.framework.Test;
+import org.jboss.test.aop.junit.AbstractTypeTest;
+import org.jboss.test.aop.junit.AbstractTypeTestDelegate;
+import org.jboss.test.microcontainer.beans.support.AccessBean;
+
+/**
+ * AOP field test case.
+ *
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class FieldAccessTestCase extends AbstractTypeTest
+{
+ public FieldAccessTestCase(String name)
+ {
+ super(name);
+ }
+
+ public static Test suite()
+ {
+ return suite(FieldAccessTestCase.class);
+ }
+
+ protected void testAccessBean(String name) throws Throwable
+ {
+ AccessBean bean = getBean(name, AccessBean.class);
+ AbstractTypeTestDelegate.Type type = getType(name);
+ if (type == AbstractTypeTestDelegate.Type.PROXY)
+ {
+ assertNull(bean.getPriString());
+ assertNull(bean.getProtString());
+ assertNull(bean.getPubString());
+ }
+ else
+ {
+ assertEquals("foobar", concat(bean));
+ }
+ }
+
+ private String concat(AccessBean bean)
+ {
+ String string = "";
+ if (bean.getPriString() != null)
+ string += bean.getPriString();
+ if (bean.getProtString() != null)
+ string += bean.getProtString();
+ if (bean.getPubString() != null)
+ string += bean.getPubString();
+ return string;
+ }
+
+ public void testFieldAccess() throws Throwable
+ {
+ testAccessBean("private");
+ testAccessBean("protected");
+ testAccessBean("public");
+
+ // this should fail or something :-) on proxy
+ AccessBean pb = getBean("public", AccessBean.class);
+ assertEquals("foobar", pb.pubString);
+ AbstractTypeTestDelegate.Type type = getType("public");
+ assertTrue(pb.getPubString() == null || type != AbstractTypeTestDelegate.Type.PROXY);
+ }
+}
More information about the jboss-cvs-commits
mailing list