deltaspike-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bernard Łabno <s4...@pjwstk.edu.pl>
Subject Re: Fw: Mock Contexts
Date Mon, 01 Oct 2012 07:57:19 GMT
I'm writing Arquillian extension that provides conversation and view
contexts.

https://community.jboss.org/thread/200461

2012/10/1 Mark Struberg <struberg@yahoo.de>

> gnnn our mail server sucks big times lately. Always rejects my mails the
> first time :/
>
>
>
> ----- Forwarded Message -----
> > From: Mark Struberg <struberg@yahoo.de>
> > To: deltaspike <deltaspike-dev@incubator.apache.org>
> > Cc:
> > Sent: Monday, October 1, 2012 9:51 AM
> > Subject: Mock Contexts
> >
> >
> >
> > Hi!
> >
> > While hacking the @ViewScoped support I ran across our MockViewContext.
> > In CODI we used a Map based dummy implementation in ProjectStage ==
> UnitTest.
> > But that might be counter productive if 'real' container unit testing is
> > done with Arquillian.
> >
> > Otoh
> > such a Mock Context is really useful in some cases. After thinking a
> > bit about it I came up with providing a MockContext which can be mapped
> > in for any other Context via ProcessAnnotatedType.
> >
> > Not sure how to run this though as currently scopes don't allow for
> > @Nonbinding payload, do they?
> >
> > The idea is to add a Configuration for all Scopes which should get
> mapped to a
> > dummy context.
> > Then
> > replace all configured scopes on the beans with 'DealtaSpikeMock' +
> > original Context name and automatically register a Context for all those
> > configured dummy scopes.
> > The lifecycle of the beans can be
> > controlled by simply injecting the Extension and accessing the
> > underlying context via the original scope annotation.
> >
> > That way we can get rid of all 'manual' Mock Contexts and only use them
> > when really needed.
> >
> > LieGrue,
> > strub
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message