当前位置: 首页>>代码示例>>Java>>正文


Java ShouldThrowException类代码示例

本文整理汇总了Java中org.jboss.arquillian.container.test.api.ShouldThrowException的典型用法代码示例。如果您正苦于以下问题:Java ShouldThrowException类的具体用法?Java ShouldThrowException怎么用?Java ShouldThrowException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ShouldThrowException类属于org.jboss.arquillian.container.test.api包,在下文中一共展示了ShouldThrowException类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: deploy

import org.jboss.arquillian.container.test.api.ShouldThrowException; //导入依赖的package包/类
/**
 * X TODO creating a WebArchive is only a workaround because JavaArchive
 * cannot contain other archives.
 */
@Deployment
@ShouldThrowException(Exception.class)
public static WebArchive deploy()
{
    JavaArchive testJar = ShrinkWrap
            .create(JavaArchive.class, "invalidMessageBundleTest.jar")
            .addPackage(BrokenMessageBundleClass.class.getPackage())
            .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");

    return ShrinkWrap
            .create(WebArchive.class, "invalidMessageBundleTest.war")
            .addAsLibraries(ArchiveUtils.getDeltaSpikeCoreArchive())
            .addAsLibraries(testJar)
            .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml")
            .addAsServiceProvider(Extension.class,
                    MessageBundleExtension.class);
}
 
开发者ID:apache,项目名称:deltaspike,代码行数:22,代码来源:BrokenMessageBundleOnClassTest.java

示例2: createDeployment

import org.jboss.arquillian.container.test.api.ShouldThrowException; //导入依赖的package包/类
/**
 * We expect this to fail with a deployment exception
 * @return the base base web application archive
 * @throws IOException - on resource failure
 */
@Deployment(testable=true)
@ShouldThrowException(DeploymentException.class)
public static WebArchive createDeployment() throws IOException {
    URL publicKey = AppScopedTest.class.getResource("/publicKey.pem");
    WebArchive webArchive = ShrinkWrap
        .create(WebArchive.class, "AppScopedTest.war")
        .addAsResource(publicKey, "/publicKey.pem")
        .addClass(AppScopedEndpoint.class)
        .addClass(TCKApplication.class)
        .addAsWebInfResource("beans.xml", "beans.xml")
        ;
    System.out.printf("WebArchive: %s\n", webArchive.toString(true));
    return webArchive;
}
 
开发者ID:eclipse,项目名称:microprofile-jwt-auth,代码行数:20,代码来源:AppScopedTest.java

示例3: deploy

import org.jboss.arquillian.container.test.api.ShouldThrowException; //导入依赖的package包/类
@Deployment
@ShouldThrowException(value = DefinitionException.class, testable = true)
public static WebArchive deploy() {
    JavaArchive testJar = ShrinkWrap
        .create(JavaArchive.class, "ftInvalidCB2.jar")
        .addClasses(CircuitBreakerClientForValidationFailureRatioPos.class)
        .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml")
        .as(JavaArchive.class);

    return ShrinkWrap
        .create(WebArchive.class, "ftInvalidCB2.war")
        .addAsLibrary(testJar);
}
 
开发者ID:eclipse,项目名称:microprofile-fault-tolerance,代码行数:14,代码来源:InvalidCircuitBreakerFailureRatioPosTest.java

示例4: deploy

import org.jboss.arquillian.container.test.api.ShouldThrowException; //导入依赖的package包/类
@Deployment
@ShouldThrowException(value = DefinitionException.class, testable = true)
public static WebArchive deploy() {
    JavaArchive testJar = ShrinkWrap
        .create(JavaArchive.class, "ftInvalidCB5.jar")
        .addClasses(CircuitBreakerClientForValidationReqVolNeg.class)
        .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml")
        .as(JavaArchive.class);

    return ShrinkWrap
        .create(WebArchive.class, "ftInvalidCB5.war")
        .addAsLibrary(testJar);
}
 
开发者ID:eclipse,项目名称:microprofile-fault-tolerance,代码行数:14,代码来源:InvalidCircuitBreakerFailureReqVolNegTest.java

示例5: deploy

import org.jboss.arquillian.container.test.api.ShouldThrowException; //导入依赖的package包/类
@Deployment
@ShouldThrowException(value = DefinitionException.class, testable = true)
public static WebArchive deploy() {
    JavaArchive testJar = ShrinkWrap
        .create(JavaArchive.class, "ftInvalidRetry4.jar")
        .addClasses(RetryClientForValidationJitter.class)
        .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml")
        .as(JavaArchive.class);

    return ShrinkWrap
        .create(WebArchive.class, "ftInvalidRetry4.war")
        .addAsLibrary(testJar);
}
 
开发者ID:eclipse,项目名称:microprofile-fault-tolerance,代码行数:14,代码来源:InvalidRetryJitterTest.java

示例6: deploy

import org.jboss.arquillian.container.test.api.ShouldThrowException; //导入依赖的package包/类
@Deployment
@ShouldThrowException(value = DefinitionException.class, testable = true)
public static WebArchive deploy() {
    JavaArchive testJar = ShrinkWrap
        .create(JavaArchive.class, "ftInvalidBulkhead3.jar")
        .addClasses(BulkheadClientForValidationAsynchQueue.class)
        .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml")
        .as(JavaArchive.class);

    return ShrinkWrap
        .create(WebArchive.class, "ftInvalidBulkhead3.war")
        .addAsLibrary(testJar);
}
 
开发者ID:eclipse,项目名称:microprofile-fault-tolerance,代码行数:14,代码来源:InvalidBulkheadAsynchQueueTest.java

示例7: deploy

import org.jboss.arquillian.container.test.api.ShouldThrowException; //导入依赖的package包/类
@Deployment
@ShouldThrowException(value = DefinitionException.class, testable = true)
public static WebArchive deploy() {
    JavaArchive testJar = ShrinkWrap
        .create(JavaArchive.class, "ftInvalidRetry1.jar")
        .addClasses(RetryClientForValidationDelay.class)
        .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml")
        .as(JavaArchive.class);

    return ShrinkWrap
        .create(WebArchive.class, "ftInvalidRetry1.war")
        .addAsLibrary(testJar);
}
 
开发者ID:eclipse,项目名称:microprofile-fault-tolerance,代码行数:14,代码来源:InvalidRetryDelayTest.java

示例8: deploy2

import org.jboss.arquillian.container.test.api.ShouldThrowException; //导入依赖的package包/类
@Deployment
@ShouldThrowException(value = DefinitionException.class, testable = true)
public static WebArchive deploy2() {
    JavaArchive testJar = ShrinkWrap
        .create(JavaArchive.class, "ftInvalidRetry3.jar")
        .addClasses(RetryClientForValidationDelayDuration.class)
        .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml")
        .as(JavaArchive.class);

    return ShrinkWrap
        .create(WebArchive.class, "ftInvalidRetry3.war")
        .addAsLibrary(testJar);
}
 
开发者ID:eclipse,项目名称:microprofile-fault-tolerance,代码行数:14,代码来源:InvalidRetryDelayDurationTest.java

示例9: deploy

import org.jboss.arquillian.container.test.api.ShouldThrowException; //导入依赖的package包/类
@Deployment
@ShouldThrowException(value = DefinitionException.class, testable = true)
public static WebArchive deploy() {
    JavaArchive testJar = ShrinkWrap
        .create(JavaArchive.class, "ftInvalidBulkhead1.jar")
        .addClasses(BulkheadClientForValidation.class)
        .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml")
        .as(JavaArchive.class);

    return ShrinkWrap
        .create(WebArchive.class, "ftInvalidBulkhead1.war")
        .addAsLibrary(testJar);
}
 
开发者ID:eclipse,项目名称:microprofile-fault-tolerance,代码行数:14,代码来源:InvalidBulkheadValueTest.java

示例10: deploy

import org.jboss.arquillian.container.test.api.ShouldThrowException; //导入依赖的package包/类
@Deployment
@ShouldThrowException(value = DefinitionException.class, testable = true)
public static WebArchive deploy() {
    JavaArchive testJar = ShrinkWrap
        .create(JavaArchive.class, "ftInvalidCB3.jar")
        .addClasses(CircuitBreakerClientForValidationFailureRatioNeg.class)
        .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml")
        .as(JavaArchive.class);

    return ShrinkWrap
        .create(WebArchive.class, "ftInvalidCB3.war")
        .addAsLibrary(testJar);
}
 
开发者ID:eclipse,项目名称:microprofile-fault-tolerance,代码行数:14,代码来源:InvalidCircuitBreakerFailureRatioNegTest.java

示例11: deploy

import org.jboss.arquillian.container.test.api.ShouldThrowException; //导入依赖的package包/类
@Deployment
@ShouldThrowException(value = DefinitionException.class, testable = true)
public static WebArchive deploy() {
    JavaArchive testJar = ShrinkWrap
        .create(JavaArchive.class, "ftInvalidCB4.jar")
        .addClasses(CircuitBreakerClientForValidationReqVol0.class)
        .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml")
        .as(JavaArchive.class);

    return ShrinkWrap
        .create(WebArchive.class, "ftInvalidCB4.war")
        .addAsLibrary(testJar);
}
 
开发者ID:eclipse,项目名称:microprofile-fault-tolerance,代码行数:14,代码来源:InvalidCircuitBreakerFailureReqVol0Test.java

示例12: deploy

import org.jboss.arquillian.container.test.api.ShouldThrowException; //导入依赖的package包/类
@Deployment
@ShouldThrowException(value = DefinitionException.class, testable = true)
public static WebArchive deploy() {
    JavaArchive testJar = ShrinkWrap
        .create(JavaArchive.class, "ftInvalidTimeout.jar")
        .addClasses(TimeoutClientForValidation.class)
        .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml")
        .as(JavaArchive.class);

    return ShrinkWrap
        .create(WebArchive.class, "ftInvalidTimeout.war")
        .addAsLibrary(testJar);
}
 
开发者ID:eclipse,项目名称:microprofile-fault-tolerance,代码行数:14,代码来源:InvalidTimeoutValueTest.java

示例13: deploy

import org.jboss.arquillian.container.test.api.ShouldThrowException; //导入依赖的package包/类
@Deployment
@ShouldThrowException(value = DefinitionException.class, testable = true)
public static WebArchive deploy() {
    JavaArchive testJar = ShrinkWrap
        .create(JavaArchive.class, "ftInvalidCB7.jar")
        .addClasses(CircuitBreakerClientForValidationSuccessNeg.class)
        .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml")
        .as(JavaArchive.class);

    return ShrinkWrap
        .create(WebArchive.class, "ftInvalidCB7.war")
        .addAsLibrary(testJar);
}
 
开发者ID:eclipse,项目名称:microprofile-fault-tolerance,代码行数:14,代码来源:InvalidCircuitBreakerFailureSuccessNegTest.java

示例14: deploy

import org.jboss.arquillian.container.test.api.ShouldThrowException; //导入依赖的package包/类
@Deployment
@ShouldThrowException(value = DefinitionException.class, testable = true)
public static WebArchive deploy() {
    JavaArchive testJar = ShrinkWrap
        .create(JavaArchive.class, "ftInvalidCB6.jar")
        .addClasses(CircuitBreakerClientForValidationSuccess0.class)
        .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml")
        .as(JavaArchive.class);

    return ShrinkWrap
        .create(WebArchive.class, "ftInvalidCB6.war")
        .addAsLibrary(testJar);
}
 
开发者ID:eclipse,项目名称:microprofile-fault-tolerance,代码行数:14,代码来源:InvalidCircuitBreakerFailureSuccess0Test.java

示例15: deploy

import org.jboss.arquillian.container.test.api.ShouldThrowException; //导入依赖的package包/类
@Deployment
@ShouldThrowException(value = DefinitionException.class, testable = true)
public static WebArchive deploy() {
    JavaArchive testJar = ShrinkWrap
        .create(JavaArchive.class, "ftInvalidCB1.jar")
        .addClasses(CircuitBreakerClientForValidationDelay.class)
        .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml")
        .as(JavaArchive.class);

    return ShrinkWrap
        .create(WebArchive.class, "ftInvalidCB1.war")
        .addAsLibrary(testJar);
}
 
开发者ID:eclipse,项目名称:microprofile-fault-tolerance,代码行数:14,代码来源:InvalidCircuitBreakerDelayTest.java


注:本文中的org.jboss.arquillian.container.test.api.ShouldThrowException类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。