• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java ShouldThrowException类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: 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, "ftInvalidRetry2.jar")
        .addClasses(RetryClientForValidationMaxRetries.class)
        .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml")
        .as(JavaArchive.class);

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


示例17: 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, "ftInvalid.jar")
        .addClasses(FallbackClientWithBothFallbacks.class, IncompatibleFallbackHandler.class)
        .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml")
        .as(JavaArchive.class);

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


示例18: deployAnotherApp

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

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


示例19: 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, "ftInvalid.jar")
        .addClasses(FallbackClient.class, IncompatibleFallbackHandler.class)
        .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml")
        .as(JavaArchive.class);

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


示例20: deployAnotherApp

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

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



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Deprecated类代码示例发布时间:2022-05-22
下一篇:
Java Field类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap