geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r703094 - /geronimo/gshell/trunk/gshell-support/gshell-spring/src/test/java/org/apache/geronimo/gshell/spring/SpringTestSupport.java
Date Thu, 09 Oct 2008 07:55:18 GMT
Author: jdillon
Date: Thu Oct  9 00:55:18 2008
New Revision: 703094

URL: http://svn.apache.org/viewvc?rev=703094&view=rev
Log:
Add some helpers

Modified:
    geronimo/gshell/trunk/gshell-support/gshell-spring/src/test/java/org/apache/geronimo/gshell/spring/SpringTestSupport.java

Modified: geronimo/gshell/trunk/gshell-support/gshell-spring/src/test/java/org/apache/geronimo/gshell/spring/SpringTestSupport.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-spring/src/test/java/org/apache/geronimo/gshell/spring/SpringTestSupport.java?rev=703094&r1=703093&r2=703094&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-spring/src/test/java/org/apache/geronimo/gshell/spring/SpringTestSupport.java
(original)
+++ geronimo/gshell/trunk/gshell-support/gshell-spring/src/test/java/org/apache/geronimo/gshell/spring/SpringTestSupport.java
Thu Oct  9 00:55:18 2008
@@ -48,9 +48,13 @@
         container.loadBeans(getConfigLocations());
     }
 
+    protected String getDefaultConfigLocation() {
+        return "classpath:" + getClass().getName().replace('.', '/') + "-context.xml";
+    }
+
     protected String[] getConfigLocations() {
         return new String[] {
-            "classpath:" + getClass().getName().replace('.', '/') + "-context.xml"
+            getDefaultConfigLocation()
         };
     }
 
@@ -60,4 +64,12 @@
         }
         return container;
     }
+
+    protected <T> T getBean(final Class<T> type) {
+        return getBeanContainer().getBean(type);
+    }
+
+    protected <T> T getBean(final String name, final Class<T> requiredType) {
+        return getBeanContainer().getBean(name, requiredType);    
+    }
 }
\ No newline at end of file



Mime
View raw message