You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Dan Adams (JIRA)" <de...@tapestry.apache.org> on 2007/06/28 16:33:25 UTC
[jira] Created: (TAPESTRY-1612) Allow access to the PageTester
registry
Allow access to the PageTester registry
---------------------------------------
Key: TAPESTRY-1612
URL: https://issues.apache.org/jira/browse/TAPESTRY-1612
Project: Tapestry
Issue Type: Improvement
Components: tapestry-core
Affects Versions: 5.0.4
Reporter: Dan Adams
Fix For: 5.0.5
PageTester creates it's own registry but then you don't have any access to it on order to get services. I've got other tests set up which create a registry, load tapestry-hibernate and my app module, and then allows me to use @Inject to inject services directly into my test classes (it's really very cool). This is great because I can start up an hsqldb in-memory db and then test my dao services for real very quickly. Now I want to take it a step further and be able to use PageTester to test pages that make use of dao services. The problem is that I can't do this if I can't access the registry to retrieve services. I could create a separate registry just so that I could use my dao services in my test to load data but that doesn't seem very clean.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
[jira] Commented: (TAPESTRY-1612) Allow access to the PageTester
registry
Posted by "Mark Shead (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-1612?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12573136#action_12573136 ]
Mark Shead commented on TAPESTRY-1612:
--------------------------------------
I'd like to second this as something that would be very useful.
>From my initial look at it, I think it might be as easy as adding:
public <T> T getService(Class<T> serviceInterface) {
return _registry.getService(serviceInterface);
}
To the PageTester class.
Another option would be just to return a reference directly to the registry itself:
public Registry getRegistry() {
return _registry;
}
I don't know enough about the internals of Tapestry to know if that would cause any other issues or not.
> Allow access to the PageTester registry
> ---------------------------------------
>
> Key: TAPESTRY-1612
> URL: https://issues.apache.org/jira/browse/TAPESTRY-1612
> Project: Tapestry
> Issue Type: Improvement
> Components: tapestry-core
> Affects Versions: 5.0.4
> Reporter: Dan Adams
>
> PageTester creates it's own registry but then you don't have any access to it on order to get services. I've got other tests set up which create a registry, load tapestry-hibernate and my app module, and then allows me to use @Inject to inject services directly into my test classes (it's really very cool). This is great because I can start up an hsqldb in-memory db and then test my dao services for real very quickly. Now I want to take it a step further and be able to use PageTester to test pages that make use of dao services. The problem is that I can't do this if I can't access the registry to retrieve services. I could create a separate registry just so that I could use my dao services in my test to load data but that doesn't seem very clean.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
[jira] Commented: (TAPESTRY-1612) Allow access to the PageTester
registry
Posted by "Dan Adams (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-1612?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12508863 ]
Dan Adams commented on TAPESTRY-1612:
-------------------------------------
So I went ahead tried the weird setup where I'm running two registries; one for my test class and the one in PageTester. It worked like a charm. The startup is slightly slower but still very fast. This still might be a good feature to have but at least we know it's possible to do it the other way successfully.
> Allow access to the PageTester registry
> ---------------------------------------
>
> Key: TAPESTRY-1612
> URL: https://issues.apache.org/jira/browse/TAPESTRY-1612
> Project: Tapestry
> Issue Type: Improvement
> Components: tapestry-core
> Affects Versions: 5.0.4
> Reporter: Dan Adams
> Fix For: 5.0.5
>
>
> PageTester creates it's own registry but then you don't have any access to it on order to get services. I've got other tests set up which create a registry, load tapestry-hibernate and my app module, and then allows me to use @Inject to inject services directly into my test classes (it's really very cool). This is great because I can start up an hsqldb in-memory db and then test my dao services for real very quickly. Now I want to take it a step further and be able to use PageTester to test pages that make use of dao services. The problem is that I can't do this if I can't access the registry to retrieve services. I could create a separate registry just so that I could use my dao services in my test to load data but that doesn't seem very clean.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
[jira] Updated: (TAPESTRY-1612) Allow access to the PageTester
registry
Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-1612?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Howard M. Lewis Ship updated TAPESTRY-1612:
-------------------------------------------
Fix Version/s: (was: 5.0.5)
5.0.6
> Allow access to the PageTester registry
> ---------------------------------------
>
> Key: TAPESTRY-1612
> URL: https://issues.apache.org/jira/browse/TAPESTRY-1612
> Project: Tapestry
> Issue Type: Improvement
> Components: tapestry-core
> Affects Versions: 5.0.4
> Reporter: Dan Adams
> Fix For: 5.0.6
>
>
> PageTester creates it's own registry but then you don't have any access to it on order to get services. I've got other tests set up which create a registry, load tapestry-hibernate and my app module, and then allows me to use @Inject to inject services directly into my test classes (it's really very cool). This is great because I can start up an hsqldb in-memory db and then test my dao services for real very quickly. Now I want to take it a step further and be able to use PageTester to test pages that make use of dao services. The problem is that I can't do this if I can't access the registry to retrieve services. I could create a separate registry just so that I could use my dao services in my test to load data but that doesn't seem very clean.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
[jira] Closed: (TAPESTRY-1612) Allow access to the PageTester
registry
Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-1612?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Howard M. Lewis Ship closed TAPESTRY-1612.
------------------------------------------
Resolution: Fixed
Fix Version/s: 5.0.11
> Allow access to the PageTester registry
> ---------------------------------------
>
> Key: TAPESTRY-1612
> URL: https://issues.apache.org/jira/browse/TAPESTRY-1612
> Project: Tapestry
> Issue Type: Improvement
> Components: tapestry-core
> Affects Versions: 5.0.4
> Reporter: Dan Adams
> Assignee: Dan Adams
> Fix For: 5.0.11
>
> Attachments: TAPESTRY-1612.patch
>
>
> PageTester creates it's own registry but then you don't have any access to it on order to get services. I've got other tests set up which create a registry, load tapestry-hibernate and my app module, and then allows me to use @Inject to inject services directly into my test classes (it's really very cool). This is great because I can start up an hsqldb in-memory db and then test my dao services for real very quickly. Now I want to take it a step further and be able to use PageTester to test pages that make use of dao services. The problem is that I can't do this if I can't access the registry to retrieve services. I could create a separate registry just so that I could use my dao services in my test to load data but that doesn't seem very clean.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
[jira] Updated: (TAPESTRY-1612) Allow access to the PageTester
registry
Posted by "Mark Shead (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-1612?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mark Shead updated TAPESTRY-1612:
---------------------------------
Attachment: TAPESTRY-1612.patch
Here is a patch that will close this issue.
> Allow access to the PageTester registry
> ---------------------------------------
>
> Key: TAPESTRY-1612
> URL: https://issues.apache.org/jira/browse/TAPESTRY-1612
> Project: Tapestry
> Issue Type: Improvement
> Components: tapestry-core
> Affects Versions: 5.0.4
> Reporter: Dan Adams
> Attachments: TAPESTRY-1612.patch
>
>
> PageTester creates it's own registry but then you don't have any access to it on order to get services. I've got other tests set up which create a registry, load tapestry-hibernate and my app module, and then allows me to use @Inject to inject services directly into my test classes (it's really very cool). This is great because I can start up an hsqldb in-memory db and then test my dao services for real very quickly. Now I want to take it a step further and be able to use PageTester to test pages that make use of dao services. The problem is that I can't do this if I can't access the registry to retrieve services. I could create a separate registry just so that I could use my dao services in my test to load data but that doesn't seem very clean.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
[jira] Assigned: (TAPESTRY-1612) Allow access to the PageTester
registry
Posted by "Dan Adams (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-1612?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dan Adams reassigned TAPESTRY-1612:
-----------------------------------
Assignee: Dan Adams
> Allow access to the PageTester registry
> ---------------------------------------
>
> Key: TAPESTRY-1612
> URL: https://issues.apache.org/jira/browse/TAPESTRY-1612
> Project: Tapestry
> Issue Type: Improvement
> Components: tapestry-core
> Affects Versions: 5.0.4
> Reporter: Dan Adams
> Assignee: Dan Adams
> Attachments: TAPESTRY-1612.patch
>
>
> PageTester creates it's own registry but then you don't have any access to it on order to get services. I've got other tests set up which create a registry, load tapestry-hibernate and my app module, and then allows me to use @Inject to inject services directly into my test classes (it's really very cool). This is great because I can start up an hsqldb in-memory db and then test my dao services for real very quickly. Now I want to take it a step further and be able to use PageTester to test pages that make use of dao services. The problem is that I can't do this if I can't access the registry to retrieve services. I could create a separate registry just so that I could use my dao services in my test to load data but that doesn't seem very clean.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org