Bernard, any feedback on this?
Do you have some time for discussing this on the list or via IRC? I would like to get this baby going and your input would be very valuable for sure. txs and LieGrue, strub >________________________________ > From: Mark Struberg <[email protected]> >To: "[email protected]" ><[email protected]> >Sent: Monday, October 1, 2012 10:04 AM >Subject: Re: Fw: Mock Contexts > >Hi Bernard! > >The idea is to have a Mock Context which is portable across all containers and >can handle various scopes. >I guess this is pretty easy to implement. The tricky part is how to >enable/configure this features. > > >The ViewScopedContext support exists in OWB since early 2009 and I ported it >over to CODI and Seam3 in 2010. > >LieGrue, >strub > > > >----- Original Message ----- >> From: Bernard Łabno <[email protected]> >> To: [email protected] >> Cc: >> Sent: Monday, October 1, 2012 9:57 AM >> Subject: Re: Fw: Mock Contexts >> >> I'm writing Arquillian extension that provides conversation and view >> contexts. >> >> https://community.jboss.org/thread/200461 >> >> 2012/10/1 Mark Struberg <[email protected]> >> >>> gnnn our mail server sucks big times lately. Always rejects my mails the >>> first time :/ >>> >>> >>> >>> ----- Forwarded Message ----- >>> > From: Mark Struberg <[email protected]> >>> > To: deltaspike <[email protected]> >>> > 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 >>> > >>> >> > > >
