You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Massimo Lusetti <ml...@gmail.com> on 2005/05/07 11:45:43 UTC

tapestry-mock jar

How can i produce tapestry-mock jar file from a 3.0.x distribution ?

I've found org.apache.tapestry.junit package belong to that jar and
would like if this belong to 3.0 tree and was removed with 4.0 and how
can i get it from the 3.0 src tree.

Any hint is really appreciated.

Thanks
-- 
Massimo

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


Re: tapestry-mock jar

Posted by Phil Zoio <ph...@realsolve.co.uk>.
The main thing you seem to need to run the Tapestry 3 mock tests in 
addition to easymock itself is org.apache.tapestry.test.Creator, which, 
from the Javadocs

"A utility class that is used to instantiate abstract Tapestry pages and 
components. It creates,
at runtime, a subclass where all abstract properties are filled in 
(complete with instance
variable, accessor and mutator methods). This isn't the same as how the 
class is enhanced at
 * runtime, but is sufficient to unit test the class, especially 
listener methods"

This class is new in 3.1/4.0. My jar includes this class, as well as 
other classes in 3.1/4 which are not in 3.0 which are needed Creator. 
Some of these classes had to be tweaked to work with 3.0 because of 
changes to interfaces, etc.

Regards,
Phil


Massimo Lusetti wrote:

>On 5/7/05, Matt Raible <li...@raibledesigns.com> wrote:
>
>  
>
>>AppFuse has a tapestry-mock.jar which I created from 3.0 (not 3.0.1 or
>>3.0.2).
>>    
>>
>
>So it's not a jar packed by tapestry distributions.
>Did you (both) pack it to easy your own test suites, am i right ?
>
>Thanks both
>  
>

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


Re: tapestry-mock jar

Posted by Matt Raible <li...@raibledesigns.com>.
On May 8, 2005, at 1:46 AM, Massimo Lusetti wrote:

> On 5/7/05, Matt Raible <li...@raibledesigns.com> wrote:
>
>> AppFuse has a tapestry-mock.jar which I created from 3.0 (not 3.0.1 or
>> 3.0.2).
>
> So it's not a jar packed by tapestry distributions.
> Did you (both) pack it to easy your own test suites, am i right ?

I created it from Tapestry's CVS - so yes you are correct that it's not 
part of the Tapestry distributions.

Matt


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


Re: tapestry-mock jar

Posted by Massimo Lusetti <ml...@gmail.com>.
On 5/7/05, Matt Raible <li...@raibledesigns.com> wrote:

> AppFuse has a tapestry-mock.jar which I created from 3.0 (not 3.0.1 or
> 3.0.2).

So it's not a jar packed by tapestry distributions.
Did you (both) pack it to easy your own test suites, am i right ?

Thanks both
-- 
Massimo

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


Re: tapestry-mock jar

Posted by Matt Raible <li...@raibledesigns.com>.
AppFuse has a tapestry-mock.jar which I created from 3.0 (not 3.0.1 or 
3.0.2).

http://tinyurl.com/ct9ge

Here's a sample test: http://tinyurl.com/84fxl

Matt

On May 7, 2005, at 6:53 AM, Phil Zoio wrote:

>
> I have done this. Basically, I took the Tapestry 3.1 alpha code and 
> hacked it to conform to 3.0.2. Not perfect but should work - does for 
> me. I was going to do a little article about it but haven't had the 
> time yet
>
> You can download the classes from my web site: 
> http://www.realsolve.co.uk/site/tech/tapestry/tapestrytest.zip
>
> If you unzip it, you'll find the folders tapestrytest and test. 
> tapestrytest contains the source (which you can compile and jar) for 
> the mock test support. test contains an example of a Page class that 
> you might test with the mock, as well as an example test
>
> In addition to the 3.0 libraries, the extra test support classes, 
> you'll also need in your classpath
>
> hivemind-1.1-alpha
> cglib-2.0.2
> easymock-1.1
> easymock-classextension-1.1
>
> Hope it helps
>
> Phil
>
>
>
>
> Massimo Lusetti wrote:
>
>> How can i produce tapestry-mock jar file from a 3.0.x distribution ?
>>
>> I've found org.apache.tapestry.junit package belong to that jar and
>> would like if this belong to 3.0 tree and was removed with 4.0 and how
>> can i get it from the 3.0 src tree.
>>
>> Any hint is really appreciated.
>>
>> Thanks
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


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


Re: tapestry-mock jar

Posted by Phil Zoio <ph...@realsolve.co.uk>.
I have done this. Basically, I took the Tapestry 3.1 alpha code and 
hacked it to conform to 3.0.2. Not perfect but should work - does for 
me. I was going to do a little article about it but haven't had the time yet

You can download the classes from my web site: 
http://www.realsolve.co.uk/site/tech/tapestry/tapestrytest.zip

If you unzip it, you'll find the folders tapestrytest and test. 
tapestrytest contains the source (which you can compile and jar) for the 
mock test support. test contains an example of a Page class that you 
might test with the mock, as well as an example test

In addition to the 3.0 libraries, the extra test support classes, you'll 
also need in your classpath

hivemind-1.1-alpha
cglib-2.0.2
easymock-1.1
easymock-classextension-1.1

Hope it helps

Phil




Massimo Lusetti wrote:

>How can i produce tapestry-mock jar file from a 3.0.x distribution ?
>
>I've found org.apache.tapestry.junit package belong to that jar and
>would like if this belong to 3.0 tree and was removed with 4.0 and how
>can i get it from the 3.0 src tree.
>
>Any hint is really appreciated.
>
>Thanks
>  
>

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