deltaspike-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Struberg <strub...@yahoo.de>
Subject Fw: CDI Extension testing with Arquillian
Date Sun, 30 Sep 2012 19:36:03 GMT
gnnnn, damn mailer daemon rejects me as spam lately :/


remailing...


----- Forwarded Message -----
> From: Mark Struberg <struberg@yahoo.de>
> To: deltaspike <deltaspike-dev@incubator.apache.org>
> Cc: Aslak Knutsen <aslak@4fs.no>
> Sent: Sunday, September 30, 2012 9:29 PM
> Subject: CDI Extension testing with Arquillian
> 
> Hi folks!
> 
> I have a small problem with testing the AbstractContext with Arquillian. 
> I wrote a DummyContext + DummyContextExtension and add them to my deployment 
> (see the last commit) but fail to test it.
> 
> It seems that neither the Weld Arquillian container not OWB (didn't test 
> others) take the Extensions from the ShrinkWrap archive but from the available 
> ClassPath. 
> 
> The registered Extension in 
> 
>         return ShrinkWrap
>                 .create(WebArchive.class, "abstractContextTest.war")
>                 .addAsLibraries(ArchiveUtils.getDeltaSpikeCoreArchive())
>                 .addAsLibraries(testJar)
>                 .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml")
>                 .addAsServiceProvider(Extension.class, 
> DummyScopeExtension.class);
> 
> just has no effect at all.
> 
> How to deal with that?
> 
> The easy solution would be to just add the Extension to the test classpath via a 
> META-INF/services/... file. 
> For now this seems the best we can do, but imo that's no clean final 
> solution, wdyt?
> 
> LieGrue,
> strub
> 

Mime
View raw message