@Deployment(managed = false, name = "deployment") public static WebArchive createDeployment() { WebArchive webArchive = ShrinkWrap.create(WebArchive.class, "PaDataFormatConfiguratorFailingTest.war") .addAsResource("META-INF/processes.xml") .addClass(AbstractFoxPlatformIntegrationTest.class) .addClass(ReferenceStoringProcessApplication.class) .addAsResource("org/camunda/bpm/integrationtest/oneTaskProcess.bpmn") .addClass(JsonSerializable.class) .addClass(FailingJsonDataFormatConfigurator.class) .addAsServiceProvider(DataFormatConfigurator.class, FailingJsonDataFormatConfigurator.class); TestContainer.addSpinJacksonJsonDataFormat(webArchive); return webArchive; }
@Deployment(name = "pa1") public static WebArchive createDeployment1() { WebArchive webArchive = ShrinkWrap.create(WebArchive.class, "pa1.war") .addAsResource("META-INF/processes.xml") .addClass(AbstractFoxPlatformIntegrationTest.class) .addClass(ProcessApplication1.class) .addClass(JsonSerializable.class) .addClass(RuntimeServiceDelegate.class) .addAsResource("org/camunda/bpm/integrationtest/functional/spin/paContextSwitch.bpmn20.xml") .addClass(JsonDataFormatConfigurator.class) .addAsServiceProvider(DataFormatConfigurator.class, JsonDataFormatConfigurator.class); TestContainer.addSpinJacksonJsonDataFormat(webArchive); return webArchive; }
@Deployment public static WebArchive createDeployment() { WebArchive webArchive = ShrinkWrap.create(WebArchive.class, "PaDataFormatTest.war") .addAsResource("META-INF/processes.xml") .addClass(AbstractFoxPlatformIntegrationTest.class) .addAsResource("org/camunda/bpm/integrationtest/oneTaskProcess.bpmn") .addClass(Foo.class) .addClass(FooDataFormat.class) .addClass(FooDataFormatProvider.class) .addClass(FooSpin.class) .addAsServiceProvider(DataFormatProvider.class, FooDataFormatProvider.class) .addClass(ReferenceStoringProcessApplication.class); return webArchive; }
@Deployment public static WebArchive createDeployment() { WebArchive archive = ShrinkWrap.create(WebArchive.class, "test.war") .addClass(PaDataformatAndPostDeployApp.class) .addAsResource("META-INF/processes.xml") .addClass(AbstractFoxPlatformIntegrationTest.class) .addAsResource("org/camunda/bpm/integrationtest/oneTaskProcess.bpmn") .addClass(Foo.class) .addClass(FooDataFormat.class) .addClass(FooDataFormatProvider.class) .addClass(FooSpin.class) .addAsServiceProvider(DataFormatProvider.class, FooDataFormatProvider.class); return archive; }
@Deployment public static WebArchive createDeployment() { WebArchive webArchive = ShrinkWrap.create(WebArchive.class, "PaDataFormatTest.war") .addAsResource("META-INF/processes.xml") .addClass(AbstractFoxPlatformIntegrationTest.class) .addClass(ReferenceStoringProcessApplication.class) .addAsResource("org/camunda/bpm/integrationtest/oneTaskProcess.bpmn") .addClass(JodaJsonSerializable.class) .addClass(JodaJsonDataFormatConfigurator.class) .addAsServiceProvider(DataFormatConfigurator.class, JodaJsonDataFormatConfigurator.class); TestContainer.addSpinJacksonJsonDataFormat(webArchive); TestContainer.addJodaTimeJacksonModule(webArchive); return webArchive; }
@Deployment(name = "pa3") public static WebArchive createDeployment1() { WebArchive webArchive = ShrinkWrap.create(WebArchive.class, "pa3.war") .addAsResource("META-INF/processes.xml") .addClass(AbstractFoxPlatformIntegrationTest.class) .addClass(ProcessApplication3.class) .addClass(XmlSerializable.class) .addClass(XmlSerializableJsonDeserializer.class) .addClass(XmlSerializableJsonSerializer.class) .addAsResource("org/camunda/bpm/integrationtest/functional/spin/paContextSwitchCustomSerializer.bpmn20.xml") .addClass(CustomDataFormatConfigurator.class) .addAsServiceProvider(DataFormatConfigurator.class, CustomDataFormatConfigurator.class); TestContainer.addSpinJacksonJsonDataFormat(webArchive); return webArchive; }
@Deployment public static WebArchive createDeployment() { WebArchive webArchive = ShrinkWrap.create(WebArchive.class, "PaDataFormatTest.war") .addAsResource("META-INF/processes.xml") .addClass(AbstractFoxPlatformIntegrationTest.class) .addClass(ReferenceStoringProcessApplication.class) .addAsResource("org/camunda/bpm/integrationtest/oneTaskProcess.bpmn") .addAsResource("org/camunda/bpm/integrationtest/functional/spin/implicitProcessVariableUpdate.bpmn") .addAsResource("org/camunda/bpm/integrationtest/functional/spin/implicitTaskVariableUpdate.bpmn") .addClass(JsonSerializable.class) .addClass(ImplicitObjectValueUpdateHandler.class) .addClass(JsonDataFormatConfigurator.class) .addAsServiceProvider(DataFormatConfigurator.class, JsonDataFormatConfigurator.class); TestContainer.addSpinJacksonJsonDataFormat(webArchive); return webArchive; }
public static WebArchive createDeployment(WebArchive war) { war.addAsServiceProvider(EntityMarshaller.class, FooWriter.class); return war; }
public static WebArchive createDeployment(WebArchive war) { war.addAsServiceProvider(EntityMarshaller.class, FooWriter.class); return war; }
@Deployment public static WebArchive createDeployment() { return OpenTracingBaseTests.createDeployment() .addAsServiceProvider(ConfigSource.class, TestConfiguration.class); }
@Deployment public static WebArchive createDeployment() { return OpenTracingBaseTests.createDeployment() .addAsServiceProvider(ConfigSource.class, TestConfiguration.class); }
@Deployment public static WebArchive createDeployment() { return OpenTracingBaseTests.createDeployment() .addAsServiceProvider(ConfigSource.class, TestConfiguration.class); }
@Deployment public static Archive deployment() { return ShrinkWrap.create(WebArchive.class) .addClasses(CDIPlainInjectionTest.class, SimpleValuesBean.class, DynamicValuesBean.class, AdditionalMatchers.class, TestConfigSource.class, DefaultPropertyBean.class) .addAsServiceProvider(ConfigSource.class, TestConfigSource.class) .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml"); }
.withTransitivity().asFile()) .addAsServiceProvider(ProcessEngineProvider.class, MockedProcessEngineProvider.class) .add(new ClassLoaderAsset("runtime/tomcat/context.xml"), "META-INF/context.xml") .addPackages(true, "org.camunda.bpm.engine.rest");
@Override public WebArchive createAuxiliaryArchive() { // Load based on package to avoid ClassNotFoundException on HttpServlet when loading ServletTestRunner return ShrinkWrap.create(WebArchive.class, "arquillian-protocol.war") .addPackage(ServletRemoteExtension.class.getPackage()) .setWebXML(new StringAsset( WebUtils.createNewDescriptor().exportAsString() )) .addAsServiceProvider(RemoteLoadableExtension.class, ServletRemoteExtension.class); } }
@Test(expected = IllegalArgumentException.class) @Override public void testAddServiceProviderStringImplementationsValidation() throws Exception { ShrinkWrap.create(WebArchive.class).addAsServiceProvider("do.not.exist.impl.Dummy", (String[]) null); }
@Test(expected = IllegalArgumentException.class) @Override public void testAddServiceProviderStringImplementationsValueValidation() throws Exception { String[] impls = {"do.not.exist.impl.Dummy1", null}; ShrinkWrap.create(WebArchive.class).addAsServiceProvider("do.not.exist.impl.Dummy", impls); }
@Test(expected = IllegalArgumentException.class) @Override public void testAddServiceProviderStringInterfaceValidation() throws Exception { String[] impls = {"do.not.exist.impl.Dummy1", "do.not.exist.impl.Dummy2", "do.not.exist.impl.Dummy3"}; ShrinkWrap.create(WebArchive.class).addAsServiceProvider(null, impls); }
@Deployment public static WebArchive createTestArchive() { return ShrinkWrap.create(WebArchive.class).addClasses(ConflictingBeansXmlTest.class, Foo.class, VerifyExtension.class) .add(new BeansXml(), "WEB-INF/classes/META-INF/beans.xml").add(new BeansXml().alternatives(Foo.class), "WEB-INF/beans.xml") .addAsServiceProvider(Extension.class, VerifyExtension.class); }
@Test public void shouldBeAbleToExportArchive() throws Exception { String content = ShrinkWrap .create(WebArchive.class, "test.jar") .addAsResource(new File("src/test/resources/tooling/arquillian.xml"), ArchivePaths.create("resource.xml")) .addAsResource("tooling/arquillian.xml", ArchivePaths.create("resource2.xml")) .addAsResource(new File("src/test/resources/tooling/arquillian.xml").toURI().toURL(), ArchivePaths.create("resource3.xml")).addClass(ToolingDeploymentFormatterTestCase.class) .addAsServiceProvider(Service.class, ServiceImpl.class) .addAsLibrary(ShrinkWrap.create(JavaArchive.class, "test.jar").addClass(ToolingDeploymentFormatter.class)) .toString(new ToolingDeploymentFormatter(getClass())); // TODO: do some output Assertions.. Assert.assertNotNull(content); System.out.println(content); }