But the object as injected by tapestry /is/ the proxy... not sure I
follow what you need.
You can use T5 IOC to grab the various services you need to
instantiate the object manually, though, so it will be "just like" the
service injected by tapestry, minus the proxy.
I'm curious: what's wrong with having the proxy as a barrier between
your unit test and your object? It's basically just delegating all
calls, anyway, so...?
Robert
On Apr 10, 2010, at 4/105:04 PM , Martijn Kaag wrote:
Hi Thiago,
I am aware of that. Unfortunately that does not fit the use case: i
need to be able to obtain the (unit test) object as injected by
tapestry.
This can be implemented by adding a method getInstance() {return
this;} to the interface and implementation. But I hoped there would
be a way of achieving this without altering the service interface.
Martijn
-----Original Message-----
From: Thiago H. de Paula Figueiredo [mailto:thiag...@gmail.com]
Sent: 09 April 2010 23:53
To: Tapestry users
Subject: Re: Obtaining the actual service instead of the interface/
proxy
On Fri, 09 Apr 2010 18:48:28 -0300, Martijn Kaag <mart...@kaag.eu>
wrote:
hi
Hi!
For unittest purposes i'd like to be able to obtain the actual
service
instatiation instead of the proxy/interface.
Any idea how to achieve this?
No. But your can instantiate the service implementation directly.
--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant,
developer,
and instructor
Owner, software architect and developer, Ars Machina Tecnologia da
Informação Ltda.
http://www.arsmachina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org