daily pastebin goal
40%
SHARE
TWEET

Untitled

a guest Mar 22nd, 2019 46 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package example.bdutra.it.cdi;
  2.  
  3. import static org.junit.Assert.assertNotNull;
  4.  
  5. import javax.inject.Inject;
  6.  
  7. import org.jboss.arquillian.container.test.api.Deployment;
  8. import org.jboss.arquillian.junit.Arquillian;
  9. import org.jboss.shrinkwrap.api.Archive;
  10. import org.jboss.shrinkwrap.api.ShrinkWrap;
  11. import org.jboss.shrinkwrap.api.spec.JavaArchive;
  12. import org.junit.Ignore;
  13. import org.junit.Test;
  14. import org.junit.runner.RunWith;
  15.  
  16. import example.bdutra.cdi.Service;
  17.  
  18. @RunWith(Arquillian.class)
  19. public class ServiceIT {
  20.  
  21.     @SuppressWarnings("rawtypes")
  22.     @Deployment
  23.     public static Archive createDeployment() {
  24.  
  25.         return ShrinkWrap.create(JavaArchive.class)
  26.                          .addPackages(true, "example.bdutra")
  27.                          .addAsResource("META-INF/beans.xml");
  28.     }
  29.  
  30.     @Inject
  31.     private Service servico;
  32.  
  33.     @Test
  34.     public void testCDI() {
  35.         assertNotNull(servico);
  36.     }
  37.  
  38. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top