Ah, ok..

Adding the tapestry web module will cause headaches. I suggest you add
builder methods to your test module for the specific web dependencies
required for the service under test. Similar to how the Request is
currently mocked.
 On 10 Sep 2014 18:09, "George Christman" <gchrist...@cardaddy.com> wrote:

> Integration testing.
>
> On Wed, Sep 10, 2014 at 1:06 PM, Lance Java <lance.j...@googlemail.com>
> wrote:
>
> > There's 2 types of tests that I feel are getting blurred here
> >
> > 1. Unit test - tests a single class. All dependencies are mocked
> >
> > 2. Integration test - tests 2 or more services in concert (might involve
> a
> > tapestry module and an in memory database)
> >
> > Which test are you trying to achieve here?
> >  On 10 Sep 2014 17:53, "Lance Java" <lance.j...@googlemail.com> wrote:
> >
> > > Unit tests don't need a module at all. Your colleague could mock the
> > > PageRenderLinkSource using Mockito and pass it to the EmailService
> > > constructor. Then test the hell out of it!
> > > On 10 Sep 2014 17:41, "George Christman" <gchrist...@cardaddy.com>
> > wrote:
> > >
> > >> Thanks Lance, I figured out the DAO issue :) Anyhow this happens to be
> > my
> > >> day job project and my co-worker is looking to test his generated
> > emails.
> > >> So if I understand you correctly, I need to include the tapestry-core?
> > If
> > >> so, is that just a mater of including TapestryModule or no?
> > >>
> > >> On Wed, Sep 10, 2014 at 12:29 PM, Lance Java <
> lance.j...@googlemail.com
> > >
> > >> wrote:
> > >>
> > >> > Hi George, PageRenderLinkSource is a part of the web framework.
> > >> >
> > >> > I mentioned before that you could split your app into 2 modules:
> > >> > api - depends on tapestry-ioc
> > >> > web - depends on tapestry-core
> > >> >
> > >> > The test case I setup for you only tests the api stuff
> (tapestry-ioc).
> > >> If
> > >> > you split into 2 modules this would be easy to see (since
> > >> > PageRenderLinkSource would not be on the test classpath).
> > >> >
> > >>
> > >>
> > >>
> > >> --
> > >> George Christman
> > >> www.CarDaddy.com
> > >> P.O. Box 735
> > >> Johnstown, New York
> > >>
> > >
> >
>
>
>
> --
> George Christman
> www.CarDaddy.com
> P.O. Box 735
> Johnstown, New York
>

Reply via email to