aslak

Arquillian - DeploymentException

Feb 1st, 2011
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.72 KB | None | 0 0
  1. @RunWith(Arquillian.class)
  2. @Run(RunModeType.AS_CLIENT) // no in_container testing with DeploymentException
  3. public class DeploymentExceptionTestCase
  4. {
  5.    @Deployment(testable = false) @DeploymentException(WeldException.class)
  6.    public static JavaArchive createFailingDeployment()
  7.    {
  8.       return ShrinkWrap.create(JavaArchive.class)
  9.                .addManifestResource(
  10.                      new StringAsset(
  11.                            Descriptors.create(BeansDescriptor.class)
  12.                            .interceptor(NotPartOfDeploymentInterceptor.class)
  13.                            .exportAsString())
  14.                      , "beans.xml");
  15.    }
  16.    
  17.    @Test
  18.    public void doNothing_DeploymentExceptionExpected() {}
  19.    
  20. }
Add Comment
Please, Sign In to add comment