Want more features on Pastebin? Sign Up, it's FREE!
Guest

Arquillian - DeploymentException

By: a guest on Feb 1st, 2011  |  syntax: Java  |  size: 0.72 KB  |  views: 156  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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. }
clone this paste RAW Paste Data