git.schokokeks.org
Repositories
Help
Report an Issue
playground.git
Code
Commits
Branches
Tags
Suche
Strukturansicht:
d129062
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
util
OneUtilsTest.java
- Integrate arquillian - first test case for JavaArchive - container: Weld EE embedded - MS: JEE-Testapp-01
Hafid Haddouti
commited
d129062
at 2014-04-26 19:46:52
OneUtilsTest.java
Blame
History
Raw
package com.haddouti.pg.jee6.util; import javax.inject.Inject; 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.spec.JavaArchive; import org.junit.Test; import org.junit.runner.RunWith; /** * Arquillian test unit * <ul> * <li>JavaArchive</li> * <li>Test normal java classes</li> * <li>Inject them</li> * </ul> * */ @RunWith(Arquillian.class) public class OneUtilsTest { @Inject private OneUtils oneUtils; @Deployment public static JavaArchive createDeployment() { final JavaArchive jar = ShrinkWrap.create(JavaArchive.class) .addClass(OneUtils.class); // Print out the archive System.out.println(jar.toString(true)); return jar; } @Test public void testUtilGetCurrentMillis() { Assert.assertNotNull(oneUtils); System.out.println(oneUtils.getCurrentMillis()); } }