You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by hl...@apache.org on 2008/03/03 00:23:33 UTC

svn commit: r632870 - /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/test/PageTester.java

Author: hlship
Date: Sun Mar  2 15:23:32 2008
New Revision: 632870

URL: http://svn.apache.org/viewvc?rev=632870&view=rev
Log:
TAPESTRY-1612: Allow access to the PageTester registry

Modified:
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/test/PageTester.java

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/test/PageTester.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/test/PageTester.java?rev=632870&r1=632869&r2=632870&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/test/PageTester.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/test/PageTester.java Sun Mar  2 15:23:32 2008
@@ -1,4 +1,4 @@
-// Copyright 2006, 2007 The Apache Software Foundation
+// Copyright 2006, 2007, 2008 The Apache Software Foundation
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -114,6 +114,26 @@
     public void shutdown()
     {
         _registry.shutdown();
+    }
+
+
+    /**
+     * Returns the Registry that was created for the application.
+     */
+    public Registry getRegistry()
+    {
+        return _registry;
+    }
+
+    /**
+     * Allows a service to be retrieved via its service interface.  Use {@link #getRegistry()} for more complicated
+     * queries.
+     *
+     * @param serviceInterface used to select the service
+     */
+    public <T> T getService(Class<T> serviceInterface)
+    {
+        return _registry.getService(serviceInterface);
     }
 
     /**