git.schokokeks.org
Repositories
Help
Report an Issue
playground.git
Code
Commits
Branches
Tags
Suche
Strukturansicht:
6f5c2c1
Branches
Tags
master
JEE-Testapp-01
JEE-Testapp-02
JEE-Testapp-03
JEE-Testapp-04
playground.git
testapp-jee6
src
test
java
com
haddouti
pg
jee6
OneServiceJarTest.java
- change CDI to EJB - change arquillian container from Weld to Glassfish embedded - MS JEE-Testapp-03
Hafid Haddouti
commited
6f5c2c1
at 2014-04-26 22:16:27
OneServiceJarTest.java
Blame
History
Raw
package com.haddouti.pg.jee6; import javax.ejb.EJB; import junit.framework.Assert; import org.jboss.arquillian.container.test.api.Deployment; import org.jboss.arquillian.junit.Arquillian; import org.jboss.shrinkwrap.api.ShrinkWrap; import org.jboss.shrinkwrap.api.asset.EmptyAsset; import org.jboss.shrinkwrap.api.spec.JavaArchive; import org.junit.Test; import org.junit.runner.RunWith; import com.haddouti.pg.jee6.service.OneStatelessBean; /** * Arquillian test case for EJB classes * */ @RunWith(Arquillian.class) public class OneServiceJarTest { @EJB OneService oneService; @Deployment public static JavaArchive createDeployment() { final JavaArchive jar = ShrinkWrap.create(JavaArchive.class) .addClass(OneStatelessBean.class) .addClass(OneService.class) .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml"); System.out.println(jar.toString(true)); return jar; } @Test public void testOne() { Assert.assertNotNull(oneService); System.out.println(oneService.process()); } }