Created
March 17, 2019 18:25
-
-
Save brunodutr/dd0ae5315e3f4a6f01ea23cb22c29b59 to your computer and use it in GitHub Desktop.
ServiceIT
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package example.bdutra.it.cdi; | |
import static org.junit.Assert.assertNotNull; | |
import javax.inject.Inject; | |
import org.jboss.arquillian.container.test.api.Deployment; | |
import org.jboss.arquillian.junit.Arquillian; | |
import org.jboss.shrinkwrap.api.Archive; | |
import org.jboss.shrinkwrap.api.ShrinkWrap; | |
import org.jboss.shrinkwrap.api.spec.JavaArchive; | |
import org.junit.Ignore; | |
import org.junit.Test; | |
import org.junit.runner.RunWith; | |
import example.bdutra.cdi.Service; | |
@RunWith(Arquillian.class) | |
public class ServiceIT { | |
@SuppressWarnings("rawtypes") | |
@Deployment | |
public static Archive createDeployment() { | |
return ShrinkWrap.create(JavaArchive.class) | |
.addPackages(true, "example.bdutra") | |
.addAsResource("META-INF/beans.xml"); | |
} | |
@Inject | |
private Service servico; | |
@Test | |
public void testCDI() { | |
assertNotNull(servico); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment