You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Mark Horn <ma...@agilesrc.com> on 2007/11/28 16:55:00 UTC

[T5] PageTester & tapestry-spring

I am using tapestry-spring to inject spring beans into my tapestry
page classes, and would like to use PageTester to unit test the pages.
 I have reviewed the Unit Test documentation but don't see a way to
get access to these beans.  Can anyone offer a suggestion?

[note: I have also reviewed the pages at
http://wiki.apache.org/tapestry/Tapestry5SpringIntegration but can't
see how these help]

a simple example page class looks like:

public class Products {
 	@Inject
	private IProductService _service;

        public List getProducts() {
              return _service.getProducts();
        }
}

where IProductService is a spring bean.  I'm using the

	<filter>
		<filter-name>app</filter-name>
		<!-- Special filter that adds in a T5 IoC module derived from the
Spring WebApplicationContext. -->
		<filter-class>
			org.apache.tapestry.spring.TapestrySpringFilter
		</filter-class>
	</filter>

in my actual web application which provides access to the beans
great.. but how do I do the same thing w/ PageTester?

Thanks,
-Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


RE: [T5] PageTester & tapestry-spring

Posted by Joel Wiegman <Jo...@dswinc.com>.
Mark,

Take a gander at this thread and see if it answers any of your
questions:

http://www.nabble.com/Using-PageTester-with-tapestry-spring-tf4508561.ht
ml

Let me know if you have any questions...

Joel 

-----Original Message-----
From: Mark Horn [mailto:mark.horn@agilesrc.com] 
Sent: Wednesday, November 28, 2007 10:55 AM
To: users@tapestry.apache.org
Subject: [T5] PageTester & tapestry-spring

I am using tapestry-spring to inject spring beans into my tapestry page
classes, and would like to use PageTester to unit test the pages.
 I have reviewed the Unit Test documentation but don't see a way to get
access to these beans.  Can anyone offer a suggestion?

[note: I have also reviewed the pages at
http://wiki.apache.org/tapestry/Tapestry5SpringIntegration but can't see
how these help]

a simple example page class looks like:

public class Products {
 	@Inject
	private IProductService _service;

        public List getProducts() {
              return _service.getProducts();
        }
}

where IProductService is a spring bean.  I'm using the

	<filter>
		<filter-name>app</filter-name>
		<!-- Special filter that adds in a T5 IoC module derived
from the Spring WebApplicationContext. -->
		<filter-class>
			org.apache.tapestry.spring.TapestrySpringFilter
		</filter-class>
	</filter>

in my actual web application which provides access to the beans great..
but how do I do the same thing w/ PageTester?

Thanks,
-Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org