You can mock services with Testify.

On Mon, Dec 6, 2010 at 7:46 PM, Igor Drobiazko <igor.drobia...@gmail.com>wrote:

> I'm wondering why you want to define any expectations on Logger. However,
> when using the PageTester you can't mock services as they are retrieved
> form
> the registry which is created from your modules. You could try to provide
> an
> additional "TestModule" which is used only in that particular test. In this
> module you can try to decorate, advise or override your services for
> testability. But again, I see logs as a noise which I don't want to test
> against.
>
> 2010/12/6 Kiss Izolda <izo...@freemail.hu>
>
>  > Hi Igor,
> >
> > We are using Tapestry's built-in testing facilities and have rendered the
> > page (tester.renderPage("MyPage"))
> > We don't necessary need to mock the org.slf4j.Logger, what we need is to
> > unit test whether the page calls the org.slf4j.Logger or not.
> >
> > thank you,
> >
> > Izolda
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > For additional commands, e-mail: users-h...@tapestry.apache.org
> >
> >
>
>
>  --
> Best regards,
>
> Igor Drobiazko
> http://tapestry5.de
>

Reply via email to