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 <da...@ifactory.com> on 2007/10/15 20:18:08 UTC

Testing class transformations

I'm working on implementing TAPESTRY-1615 for allowing adding code to
the beginning of a method. The problem is that I'm having a hard time
testing it. Is there a way I can unit test this? Or do I need to create
a class transform worker in an integration test module, create a test
page, and use page tester?

-- 
Dan Adams
Senior Software Engineer
Interactive Factory
617.235.5857


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


Re: Testing class transformations

Posted by Dan Adams <da...@ifactory.com>.
Yeah, I ended up adding a test page, an annotation, a worker for the
annotation that used my enhancement method, and a page that used the
annotation. Wasn't quite as painful as it sounds.

On Mon, 2007-10-15 at 12:12 -0700, Howard Lewis Ship wrote:
> That's one option.
> 
> Certainly, the only way to test dynamic code generation is to test the
> GENERATED code, even if you have to mock up the rest.
> 
> On 10/15/07, Dan Adams <da...@ifactory.com> wrote:
> >
> > I'm working on implementing TAPESTRY-1615 for allowing adding code to
> > the beginning of a method. The problem is that I'm having a hard time
> > testing it. Is there a way I can unit test this? Or do I need to create
> > a class transform worker in an integration test module, create a test
> > page, and use page tester?
> >
> > --
> > Dan Adams
> > Senior Software Engineer
> > Interactive Factory
> > 617.235.5857
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: dev-help@tapestry.apache.org
> >
> >
> 
> 
-- 
Dan Adams
Senior Software Engineer
Interactive Factory
617.235.5857


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


Re: Testing class transformations

Posted by Howard Lewis Ship <hl...@gmail.com>.
That's one option.

Certainly, the only way to test dynamic code generation is to test the
GENERATED code, even if you have to mock up the rest.

On 10/15/07, Dan Adams <da...@ifactory.com> wrote:
>
> I'm working on implementing TAPESTRY-1615 for allowing adding code to
> the beginning of a method. The problem is that I'm having a hard time
> testing it. Is there a way I can unit test this? Or do I need to create
> a class transform worker in an integration test module, create a test
> page, and use page tester?
>
> --
> Dan Adams
> Senior Software Engineer
> Interactive Factory
> 617.235.5857
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
>
>


-- 
Howard M. Lewis Ship
Partner and Senior Architect at Feature50

Creator Apache Tapestry and Apache HiveMind