-
1. Re: Weld SE junit test with Request/Session Contexts, Request/Session Mocks, is this possible with Arquillian?
aslak Nov 29, 2010 5:03 AM (in response to mtaal)If you use Weld EE instead of Weld SE container, you should have Request / Session scopes..
http://docs.jboss.org/arquillian/reference/latest/en-US/html_single/#container.weld-ee-embedded-11
-
2. Re: Weld SE junit test with Request/Session Contexts, Request/Session Mocks, is this possible with Arquillian?
mtaal Nov 29, 2010 5:11 AM (in response to aslak)Thanks for your answer!
I understand, but this would force me to use an EE container (with all its additional dependencies etc.) which I don't use normally. I am looking for a solution which uses Weld SE (which i think is great as it feels quite light and easy to use).
gr. Martin
-
3. Re: Weld SE junit test with Request/Session Contexts, Request/Session Mocks, is this possible with Arquillian?
aslak Nov 29, 2010 5:39 AM (in response to mtaal)weld-ee-embedded is weld-se with some Servlet/EE mock APIs + Request/Sesison contexts activated.
The extra dependencies are just APIs, no EE container implementation needed.
The different versions are there to simulate the different use cases for Weld, SE for a pure SE environment and EE for a Servlet/EE environment.
-
4. Re: Weld SE junit test with Request/Session Contexts, Request/Session Mocks, is this possible with Arquillian?
mtaal Nov 29, 2010 8:47 AM (in response to aslak)Ha great, sorry for my confusion!
I have it working now with adding the dependencies to my web project manually. It all works, setting up the ShrinkWrapper creation was actually quite easy (although I was at first a bit reluctant with this additional dependency).
For someone elses references, I have these dependencies (do I need them all you think?):
arquillian-api-1.0.0.Alpha4.jar
arquillian-impl-base-1.0.0.Alpha4.jar
arquillian-junit-1.0.0.Alpha4.jar
arquillian-protocol-local-1.0.0.Alpha4.jar
arquillian-spi-1.0.0.Alpha4.jar
arquillian-testenricher-cdi-1.0.0.Alpha4.jar
arquillian-weld-ee-embedded-1.1-1.0.0.Alpha4.jar
jboss-ejb3-api-3.1.0.jar
shrinkwrap-api-1.0.0-alpha-11.jar
shrinkwrap-extension-classloader-1.0.0-alpha-11.jar
shrinkwrap-impl-base-1.0.0-alpha-11.jar
shrinkwrap-spi-1.0.0-alpha-11.jar
validation-api-1.0.0.GA.jar
gr. Martin
/home/mtaal/mydata/dev/openbravo/projects/pi/modules/org.openbravo.base.weld/lib/test/arquillian-api-1.0.0.Alpha4.jar/home/mtaal/mydata/dev/openbravo/projects/pi/modules/org.openbravo.base.weld/lib/test/arquillian-impl-base-1.0.0.Alpha4.jar/home/mtaal/mydata/dev/openbravo/projects/pi/modules/org.openbravo.base.weld/lib/test/arquillian-junit-1.0.0.Alpha4.jar/home/mtaal/mydata/dev/openbravo/projects/pi/modules/org.openbravo.base.weld/lib/test/arquillian-protocol-local-1.0.0.Alpha4.jar/home/mtaal/mydata/dev/openbravo/projects/pi/modules/org.openbravo.base.weld/lib/test/arquillian-spi-1.0.0.Alpha4.jar/home/mtaal/mydata/dev/openbravo/projects/pi/modules/org.openbravo.base.weld/lib/test/arquillian-testenricher-cdi-1.0.0.Alpha4.jar/home/mtaal/mydata/dev/openbravo/projects/pi/modules/org.openbravo.base.weld/lib/test/arquillian-weld-ee-embedded-1.1-1.0.0.Alpha4.jar/home/mtaal/mydata/dev/openbravo/projects/pi/modules/org.openbravo.base.weld/lib/test/jboss-ejb3-api-3.1.0.jar/home/mtaal/mydata/dev/openbravo/projects/pi/modules/org.openbravo.base.weld/lib/test/shrinkwrap-api-1.0.0-alpha-11.jar/home/mtaal/mydata/dev/openbravo/projects/pi/modules/org.openbravo.base.weld/lib/test/shrinkwrap-extension-classloader-1.0.0-alpha-11.jar/home/mtaal/mydata/dev/openbravo/projects/pi/modules/org.openbravo.base.weld/lib/test/shrinkwrap-impl-base-1.0.0-alpha-11.jar/home/mtaal/mydata/dev/openbravo/projects/pi/modules/org.openbravo.base.weld/lib/test/shrinkwrap-spi-1.0.0-alpha-11.jar/home/mtaal/mydata/dev/openbravo/projects/pi/modules/org.openbravo.base.weld/lib/test/validation-api-1.0.0.GA.ja
-
5. Re: Weld SE junit test with Request/Session Contexts, Request/Session Mocks, is this possible with Arquillian?
aslak Nov 29, 2010 9:21 AM (in response to mtaal)if your using maven, you only need to add arquillian-junit, arquillian-weld-ee-embedded and junit + the ee api libs needed by weld-ee-embedded described in the docs.
The rest should be pulled in via transitive deps.