當前位置: 首頁>>代碼示例>>Java>>正文


Java Deployment類代碼示例

本文整理匯總了Java中org.jboss.arquillian.container.test.api.Deployment的典型用法代碼示例。如果您正苦於以下問題:Java Deployment類的具體用法?Java Deployment怎麽用?Java Deployment使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


Deployment類屬於org.jboss.arquillian.container.test.api包,在下文中一共展示了Deployment類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: deploy

import org.jboss.arquillian.container.test.api.Deployment; //導入依賴的package包/類
@Deployment
public static WebArchive deploy() {
    JavaArchive testJar = ShrinkWrap
            .create(JavaArchive.class, "configProviderTest.jar")
            .addPackage(AbstractTest.class.getPackage())
            .addClass(ConfigProviderTest.class)
            .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml")
            .as(JavaArchive.class);

    AbstractTest.addFile(testJar, "META-INF/javaconfig.properties");

    WebArchive war = ShrinkWrap
            .create(WebArchive.class, "configProviderTest.war")
            .addAsLibrary(testJar);
    return war;
}
 
開發者ID:eclipse,項目名稱:ConfigJSR,代碼行數:17,代碼來源:ConfigProviderTest.java

示例2: deployAnotherApp

import org.jboss.arquillian.container.test.api.Deployment; //導入依賴的package包/類
@Deployment
public static WebArchive deployAnotherApp() {
    JavaArchive testJar = ShrinkWrap
        .create(JavaArchive.class, "ftConfig.jar")
        .addClasses(BeanWithRetry.class)
        .addAsManifestResource(new StringAsset(
            "org.eclipse.microprofile.fault.tolerance.tck.config.BeanWithRetry/Retry/maxRetries=5" +
                "\nRetry/maxRetries=7"), "microprofile-config.properties")
        .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml")
        .as(JavaArchive.class);

    WebArchive war = ShrinkWrap
        .create(WebArchive.class, "ftConfigTest.war")
        .addAsLibrary(testJar);
    return war;
}
 
開發者ID:eclipse,項目名稱:microprofile-fault-tolerance,代碼行數:17,代碼來源:ConfigPropertyGlobalVsClassTest.java

示例3: deploy

import org.jboss.arquillian.container.test.api.Deployment; //導入依賴的package包/類
@Deployment
public static WebArchive deploy() {
    JavaArchive testJar = ShrinkWrap.create(JavaArchive.class, "ftCircuitBreaker.jar")
                    .addClasses(CircuitBreakerClientWithDelay.class,
                                    CircuitBreakerClientNoDelay.class,
                                    CircuitBreakerClassLevelClientWithDelay.class,
                                    CircuitBreakerClientDefaultSuccessThreshold.class,
                                    CircuitBreakerClientHigherSuccessThreshold.class,
                                    Misc.class)
                    .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml")
                    .as(JavaArchive.class);

    WebArchive war = ShrinkWrap.create(WebArchive.class, "ftCircuitBreaker.war")
                    .addAsLibrary(testJar);
    return war;
}
 
開發者ID:eclipse,項目名稱:microprofile-fault-tolerance,代碼行數:17,代碼來源:CircuitBreakerTest.java

示例4: deploy

import org.jboss.arquillian.container.test.api.Deployment; //導入依賴的package包/類
@Deployment
public static WebArchive deploy() {
    JavaArchive testJar = ShrinkWrap
            .create(JavaArchive.class, "arrayConverterTest.jar")
            .addPackage(PizzaConverter.class.getPackage())
            .addClass(ArrayConverterTest.class)
            .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml")
            .addAsServiceProvider(Converter.class, PizzaConverter.class)
            .as(JavaArchive.class);

    addFile(testJar, "META-INF/javaconfig.properties");

    WebArchive war = ShrinkWrap
            .create(WebArchive.class, "arrayConverterTest.war")
            .addAsLibrary(testJar);
    return war;
}
 
開發者ID:eclipse,項目名稱:ConfigJSR,代碼行數:18,代碼來源:ArrayConverterTest.java

示例5: deployAnotherApp

import org.jboss.arquillian.container.test.api.Deployment; //導入依賴的package包/類
@Deployment
public static WebArchive deployAnotherApp() {
    JavaArchive testJar = ShrinkWrap
        .create(JavaArchive.class, "ftConfig.jar")
        .addClasses(BeanWithRetry.class)
        .addAsManifestResource(new StringAsset(
                                   "org.eclipse.microprofile.fault.tolerance.tck.config.BeanWithRetry/Retry/maxRetries=5" +
                                       "\norg.eclipse.microprofile.fault.tolerance.tck.config.BeanWithRetry/triggerException/Retry/maxRetries=6"),
                               "microprofile-config.properties")
        .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml")
        .as(JavaArchive.class);

    WebArchive war = ShrinkWrap
        .create(WebArchive.class, "ftConfigTest.war")
        .addAsLibrary(testJar);
    return war;
}
 
開發者ID:eclipse,項目名稱:microprofile-fault-tolerance,代碼行數:18,代碼來源:ConfigPropertyOnClassAndMethodTest.java

示例6: deployment

import org.jboss.arquillian.container.test.api.Deployment; //導入依賴的package包/類
@Deployment
public static WebArchive deployment() {
  PomEquippedResolveStage pom = Maven.resolver().loadPomFromFile("pom.xml");

  String[] libraries = new String[]{"de.undercouch:actson", "commons-io:commons-io"};

  return ShrinkWrap.create(WebArchive.class)
    .addPackage(SingleItemPublisher.class.getPackage())
    .addPackage(Customer.class.getPackage())
    .addPackage(JsonConverter.class.getPackage())
    .addPackage(PublisherMessageBodyReader.class.getPackage())
    .addAsLibraries(pom.resolve(libraries).withTransitivity().asFile())
    .setWebXML(new StringAsset(Descriptors.create(WebAppDescriptor.class)
      .addDefaultNamespaces()
      .version("3.1")
      .exportAsString()));
}
 
開發者ID:openknowledge,項目名稱:reactive-jax-rs,代碼行數:18,代碼來源:CustomerBatchUploadTest.java

示例7: createDeployment

import org.jboss.arquillian.container.test.api.Deployment; //導入依賴的package包/類
@Deployment
public static JavaArchive createDeployment() {

    return ShrinkWrap.create(JavaArchive.class)
            .addClasses(A.class, Data.class)
            //besides the classes, also need to add resources
            .addAsResource("META-INF/persistence.xml");
}
 
開發者ID:arcuri82,項目名稱:testing_security_development_enterprise_systems,代碼行數:9,代碼來源:SingletonTest.java

示例8: createTestArchive

import org.jboss.arquillian.container.test.api.Deployment; //導入依賴的package包/類
@Deployment
static Archive<?> createTestArchive() {
    return ShrinkWrap.create(JavaArchive.class)
            // Test bean
            .addClasses(MultipleMetricsConstructorBean.class, MetricsUtil.class)
            // Bean archive deployment descriptor
            .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
}
 
開發者ID:eclipse,項目名稱:microprofile-metrics,代碼行數:9,代碼來源:MultipleMetricsConstructorBeanTest.java

示例9: createTestArchive

import org.jboss.arquillian.container.test.api.Deployment; //導入依賴的package包/類
@Deployment
public static Archive<?> createTestArchive() {
    return ArquillianDeployment.baseDeployment()
            .addClasses(
                    CacheDataBuilder.class,
                    CacheResources.class,
                    BeerCache.class,
                    CacheBeerService.class);
}
 
開發者ID:briantward,項目名稱:jdg-lab,代碼行數:10,代碼來源:SearchArquillianTest.java

示例10: deployment

import org.jboss.arquillian.container.test.api.Deployment; //導入依賴的package包/類
@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");
}
 
開發者ID:eclipse,項目名稱:ConfigJSR,代碼行數:9,代碼來源:CDIPlainInjectionTest.java

示例11: createTestArchive

import org.jboss.arquillian.container.test.api.Deployment; //導入依賴的package包/類
@Deployment
static Archive<?> createTestArchive() {
    return ShrinkWrap.create(JavaArchive.class)
        // Test bean
        .addClass(MeteredConstructorBean.class)
        // Bean archive deployment descriptor
        .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
}
 
開發者ID:eclipse,項目名稱:microprofile-metrics,代碼行數:9,代碼來源:MeteredConstructorBeanTest.java

示例12: createTestArchive

import org.jboss.arquillian.container.test.api.Deployment; //導入依賴的package包/類
@Deployment
public static Archive<?> createTestArchive() {
    return ArquillianDeployment.baseDeployment()
            .addClasses(DatabaseBeerService.class, DatabaseDataBuilder.class)
            .addAsResource( "META-INF/persistence.xml")
            .addAsResource("import.sql")
            .addAsWebInfResource("test-ds.xml");
}
 
開發者ID:briantward,項目名稱:jdg-lab,代碼行數:9,代碼來源:DatabaseDataArquillianTest.java

示例13: createDeployment

import org.jboss.arquillian.container.test.api.Deployment; //導入依賴的package包/類
@Deployment
public static WebArchive createDeployment() {
    StringAsset mpConfig = new StringAsset(JsonPClient.class.getName() + "/mp-rest/url=" + getStringURL());
    return ShrinkWrap.create(WebArchive.class)
        .addClass(JsonPClient.class)
        .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml")
        .addAsWebInfResource(mpConfig, "classes/META-INF/microprofile-config.properties");
}
 
開發者ID:eclipse,項目名稱:microprofile-rest-client,代碼行數:9,代碼來源:InvokeWithJsonPProviderTest.java

示例14: createWebDeployment

import org.jboss.arquillian.container.test.api.Deployment; //導入依賴的package包/類
@Deployment
public static WebArchive createWebDeployment() {
	final WebArchive war = create(WebArchive.class, "component-test.war");
	war.addPackage(MyComponent.class.getPackage());
	war.addAsWebInfResource(INSTANCE, "beans.xml");
	war.addAsWebInfResource(new FileAsset(new File("src/test/resources/web.xml")), "web.xml");
	return war;
}
 
開發者ID:PacktPublishing,項目名稱:Mastering-Java-EE-Development-with-WildFly,代碼行數:9,代碼來源:ComponentTestCase.java

示例15: createWebDeployment

import org.jboss.arquillian.container.test.api.Deployment; //導入依賴的package包/類
@Deployment
public static WebArchive createWebDeployment() {
	final WebArchive war = create(WebArchive.class, "other-test.war");
	war.addPackage(HttpApplication.class.getPackage());
	war.addAsWebInfResource(INSTANCE, "beans.xml");
	return war;
}
 
開發者ID:PacktPublishing,項目名稱:Mastering-Java-EE-Development-with-WildFly,代碼行數:8,代碼來源:OtherTestCase.java


注:本文中的org.jboss.arquillian.container.test.api.Deployment類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。