Skip to content

Instantly share code, notes, and snippets.

@brunodutr
Created March 17, 2019 18:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brunodutr/dd0ae5315e3f4a6f01ea23cb22c29b59 to your computer and use it in GitHub Desktop.
Save brunodutr/dd0ae5315e3f4a6f01ea23cb22c29b59 to your computer and use it in GitHub Desktop.
ServiceIT
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