本文整理匯總了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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()));
}
示例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");
}
示例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");
}
示例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);
}
示例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");
}
示例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");
}
示例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");
}
示例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");
}
示例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