package org.arquillian.example; import org.arquillian.example.MySimpleBean; import javax.inject.Inject; 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.jboss.shrinkwrap.api.asset.EmptyAsset; import org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.*; import static org.hamcrest.core.Is.*; @RunWith(Arquillian.class) public class MySimpleBeanTest { @Inject private MySimpleBean mysimplebean; @Deployment public static JavaArchive createDeployment() { return ShrinkWrap.create(JavaArchive.class, "test.jar") .addClass(MySimpleBean.class) .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml"); } @Test public void testIsDeployed() { Assert.assertNotNull(mysimplebean); } }
JBoss Forge
最新推荐文章于 2020-06-14 22:05:52 发布