[jboss-cvs] JBossAS SVN: r57580 - projects/aop/trunk/aop/src/test/org/jboss/test/aop/methodoverride

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Oct 11 18:42:00 EDT 2006


Author: stalep
Date: 2006-10-11 18:41:57 -0400 (Wed, 11 Oct 2006)
New Revision: 57580

Added:
   projects/aop/trunk/aop/src/test/org/jboss/test/aop/methodoverride/MethodOverrideTestCase.java
   projects/aop/trunk/aop/src/test/org/jboss/test/aop/methodoverride/POJI.java
   projects/aop/trunk/aop/src/test/org/jboss/test/aop/methodoverride/POJO.java
Log:
[JBAOP-255]
simple test to confirm the bug.

Added: projects/aop/trunk/aop/src/test/org/jboss/test/aop/methodoverride/MethodOverrideTestCase.java
===================================================================
--- projects/aop/trunk/aop/src/test/org/jboss/test/aop/methodoverride/MethodOverrideTestCase.java	2006-10-11 22:41:52 UTC (rev 57579)
+++ projects/aop/trunk/aop/src/test/org/jboss/test/aop/methodoverride/MethodOverrideTestCase.java	2006-10-11 22:41:57 UTC (rev 57580)
@@ -0,0 +1,77 @@
+/*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, 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.aop.methodoverride;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+
+import org.jboss.aop.proxy.ClassProxyFactory;
+import org.jboss.test.aop.AOPTestWithSetup;
+
+/**
+ *
+ * @author <a href="mailto:stalep at conduct.no">Stale W. Pedersen</a>
+ * @version $Revision
+ */
+public class MethodOverrideTestCase extends AOPTestWithSetup
+{
+   
+   public static void main(String[] args)
+   {
+      TestRunner.run(suite());
+   }
+
+   public static Test suite()
+   {
+      TestSuite suite = new TestSuite("MethodOverrideTestCase");
+      suite.addTestSuite(MethodOverrideTestCase.class);
+      return suite;
+   }
+
+   public MethodOverrideTestCase(String name)
+   {
+      super(name);
+   }
+
+   protected void setUp() throws Exception
+   {
+      super.setUp();
+   }
+   
+   public void testMethod()
+   {
+      try {
+      ClassProxyFactory.newInstance(POJO.class);
+      assertTrue("ClassProxy failed to instrument class", true);
+      }
+      catch(Exception e)
+      {
+         System.out.println("ERROR: "+e.getMessage());
+         e.printStackTrace();
+         assertTrue("ClassProxy failed to instrument class", false);
+         
+      }
+     
+   }
+
+}
\ No newline at end of file

Added: projects/aop/trunk/aop/src/test/org/jboss/test/aop/methodoverride/POJI.java
===================================================================
--- projects/aop/trunk/aop/src/test/org/jboss/test/aop/methodoverride/POJI.java	2006-10-11 22:41:52 UTC (rev 57579)
+++ projects/aop/trunk/aop/src/test/org/jboss/test/aop/methodoverride/POJI.java	2006-10-11 22:41:57 UTC (rev 57580)
@@ -0,0 +1,33 @@
+/*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, 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.aop.methodoverride;
+
+/**
+ *
+ * @author <a href="mailto:stalep at conduct.no">Stale W. Pedersen</a>
+ * @version $Revision
+ */
+public interface POJI
+{
+   public Object getFoo();
+
+}

Added: projects/aop/trunk/aop/src/test/org/jboss/test/aop/methodoverride/POJO.java
===================================================================
--- projects/aop/trunk/aop/src/test/org/jboss/test/aop/methodoverride/POJO.java	2006-10-11 22:41:52 UTC (rev 57579)
+++ projects/aop/trunk/aop/src/test/org/jboss/test/aop/methodoverride/POJO.java	2006-10-11 22:41:57 UTC (rev 57580)
@@ -0,0 +1,43 @@
+/*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, 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.aop.methodoverride;
+
+/**
+ *
+ * @author <a href="mailto:stalep at conduct.no">Stale W. Pedersen</a>
+ * @version $Revision
+ */
+public class POJO implements POJI
+{
+   private String foo;
+
+   public POJO(String f)
+   {
+      foo = f;
+   }
+ 
+   public String getFoo()
+   {
+      return foo;
+   }
+
+}




More information about the jboss-cvs-commits mailing list