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

Java ErrorMessageFactory类代码示例

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

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



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

示例1: shouldHaveParameter

import org.assertj.core.error.ErrorMessageFactory; //导入依赖的package包/类
public static ErrorMessageFactory shouldHaveParameter(Object actual, String name, String expectedValue,
                                                      List<String> actualValues) {
  if (expectedValue == null)
    return new ShouldHaveParameter(multipleValues(actualValues) ? SHOULD_HAVE_PARAMETER_WITHOUT_VALUE_BUT_HAD_VALUES
        : SHOULD_HAVE_PARAMETER_WITHOUT_VALUE_BUT_HAD_VALUE, actual, name, valueDescription(actualValues));

  if (noValueIn(actualValues))
    return new ShouldHaveParameter(SHOULD_HAVE_PARAMETER_WITH_VALUE_BUT_HAD_NO_VALUE, actual, name, expectedValue);

  return new ShouldHaveParameter(multipleValues(actualValues) ? SHOULD_HAVE_PARAMETER_VALUE_BUT_HAD_WRONG_VALUES
      : SHOULD_HAVE_PARAMETER_VALUE_BUT_HAD_WRONG_VALUE, actual, name, expectedValue, valueDescription(actualValues));
}
 
开发者ID:joel-costigliola,项目名称:assertj-core,代码行数:13,代码来源:ShouldHaveParameter.java


示例2: shouldHaveNoParameter

import org.assertj.core.error.ErrorMessageFactory; //导入依赖的package包/类
public static ErrorMessageFactory shouldHaveNoParameter(Object actual, String name, String unwantedValue,
                                                        List<String> actualValues) {
  if (noValueIn(actualValues))
    return new ShouldHaveParameter(SHOULD_HAVE_NO_PARAMETER_WITHOUT_VALUE_BUT_FOUND_ONE, actual, name);

  return new ShouldHaveParameter(SHOULD_HAVE_NO_PARAMETER_WITH_GIVEN_VALUE_BUT_FOUND_ONE, actual, name,
                                 unwantedValue);
}
 
开发者ID:joel-costigliola,项目名称:assertj-core,代码行数:9,代码来源:ShouldHaveParameter.java


示例3: shouldHaveEqualUpperEndpoint

import org.assertj.core.error.ErrorMessageFactory; //导入依赖的package包/类
public static <T extends Comparable<T>> ErrorMessageFactory shouldHaveEqualUpperEndpoint(final Range<T> actual,
                                                                                       final Object value) {
return new RangeShouldHaveUpperEndpointEqual("%n" +
                                             "Expecting:%n" +
                                             "  <%s>%n" +
                                             "to have upper endpoint equal to:%n" +
                                             "  <%s>%n" +
                                             "but was:%n" +
                                             "  <%s>",
                                             actual, value, actual.upperEndpoint());
 }
 
开发者ID:joel-costigliola,项目名称:assertj-guava,代码行数:12,代码来源:RangeShouldHaveUpperEndpointEqual.java


示例4: shouldHaveEqualLowerEndpoint

import org.assertj.core.error.ErrorMessageFactory; //导入依赖的package包/类
public static <T extends Comparable<T>> ErrorMessageFactory shouldHaveEqualLowerEndpoint(final Range<T> actual,
                                                                                       final Object value) {
return new RangeShouldHaveLowerEndpointEqual("%n" +
                                             "Expecting:%n" +
                                             "  <%s>%n" +
                                             "to have lower endpoint equal to:%n" +
                                             "  <%s>%n" +
                                             "but was:%n" +
                                             "  <%s>",
                                             actual, value, actual.lowerEndpoint());
 }
 
开发者ID:joel-costigliola,项目名称:assertj-guava,代码行数:12,代码来源:RangeShouldHaveLowerEndpointEqual.java


示例5: shouldContainAtLeastTimes

import org.assertj.core.error.ErrorMessageFactory; //导入依赖的package包/类
public static ErrorMessageFactory shouldContainAtLeastTimes(final Multiset<?> actual, final Object expected,
                                                            final int expectedTimes, final int actualTimes) {
  return new MultisetShouldContainAtLeastTimes("%n" +
                                               "Expecting:%n" +
                                               "  <%s>%n" +
                                               "to contain:%n" +
                                               "  <%s>%n" +
                                               "at least %s times but was found %s times.", 
                                               actual, expected, expectedTimes, actualTimes);
}
 
开发者ID:joel-costigliola,项目名称:assertj-guava,代码行数:11,代码来源:MultisetShouldContainAtLeastTimes.java


示例6: shouldContainTimes

import org.assertj.core.error.ErrorMessageFactory; //导入依赖的package包/类
public static ErrorMessageFactory shouldContainTimes(final Multiset<?> actual, final Object expected,
                                                     final int expectedTimes, final int actualTimes) {
  return new MultisetShouldContainTimes("%n" +
                                        "Expecting:%n" +
                                        "  <%s>%n" +
                                        "to contain:%n" +
                                        "  <%s>%n" +
                                        "exactly %s times but was found %s times.", 
                                        actual, expected, expectedTimes, actualTimes);
}
 
开发者ID:joel-costigliola,项目名称:assertj-guava,代码行数:11,代码来源:MultisetShouldContainTimes.java


示例7: shouldContainAtMostTimes

import org.assertj.core.error.ErrorMessageFactory; //导入依赖的package包/类
public static ErrorMessageFactory shouldContainAtMostTimes(final Multiset<?> actual, final Object expected,
                                                           final int expectedTimes, final int actualTimes) {
  return new MultisetShouldContainAtMostTimes("%n" +
                                              "Expecting:%n" +
                                              "  <%s>%n" +
                                              "to contain:%n" +
                                              "  <%s>%n" +
                                              "at most %s times but was found %s times.", 
                                              actual, expected, expectedTimes, actualTimes);
}
 
开发者ID:joel-costigliola,项目名称:assertj-guava,代码行数:11,代码来源:MultisetShouldContainAtMostTimes.java


示例8: expectAssertionError

import org.assertj.core.error.ErrorMessageFactory; //导入依赖的package包/类
public void expectAssertionError(ErrorMessageFactory errorMessageFactory) {
    delegate.expect(new ThrowableMatcher<>(AssertionError.class, errorMessageFactory.create()));
}
 
开发者ID:assertj,项目名称:assertj-vavr,代码行数:4,代码来源:ExpectedException.java


示例9: shouldHaveETag

import org.assertj.core.error.ErrorMessageFactory; //导入依赖的package包/类
public static ErrorMessageFactory shouldHaveETag(Object actual, String expected, String found) {
    return new ShouldHaveETag(actual, expected, found);
}
 
开发者ID:OpenG,项目名称:aws-java-sdk,代码行数:4,代码来源:ShouldHaveETag.java


示例10: shouldHaveName

import org.assertj.core.error.ErrorMessageFactory; //导入依赖的package包/类
public static ErrorMessageFactory shouldHaveName(Object actual, String expected, String found) {
    return new ShouldHaveName(actual, expected, found);
}
 
开发者ID:OpenG,项目名称:aws-java-sdk,代码行数:4,代码来源:ShouldHaveName.java


示例11: shouldHaveContentMd5

import org.assertj.core.error.ErrorMessageFactory; //导入依赖的package包/类
public static ErrorMessageFactory shouldHaveContentMd5(PutObjectResult actual, String expected) {
    return expected == null ? new ShouldHaveContentMd5(actual) : new ShouldHaveContentMd5(actual, expected);
}
 
开发者ID:OpenG,项目名称:aws-java-sdk,代码行数:4,代码来源:ShouldHaveContentMd5.java


示例12: shouldHaveBucketName

import org.assertj.core.error.ErrorMessageFactory; //导入依赖的package包/类
public static ErrorMessageFactory shouldHaveBucketName(S3Object actual, String expected) {
    return expected == null ? new ShouldHaveBucketName(actual) : new ShouldHaveBucketName(actual, expected);
}
 
开发者ID:OpenG,项目名称:aws-java-sdk,代码行数:4,代码来源:ShouldHaveBucketName.java


示例13: shouldHaveKey

import org.assertj.core.error.ErrorMessageFactory; //导入依赖的package包/类
public static ErrorMessageFactory shouldHaveKey(S3Object actual, String expected) {
    return expected == null ? new ShouldHaveKey(actual) : new ShouldHaveKey(actual, expected);
}
 
开发者ID:OpenG,项目名称:aws-java-sdk,代码行数:4,代码来源:ShouldHaveKey.java


示例14: shouldHaveDisplayName

import org.assertj.core.error.ErrorMessageFactory; //导入依赖的package包/类
public static ErrorMessageFactory shouldHaveDisplayName(Object actual, String expected, String found) {
    return new ShouldHaveDisplayName(actual, expected, found);
}
 
开发者ID:OpenG,项目名称:aws-java-sdk,代码行数:4,代码来源:ShouldHaveDisplayName.java


示例15: shouldBeWithin

import org.assertj.core.error.ErrorMessageFactory; //导入依赖的package包/类
public static ErrorMessageFactory shouldBeWithin(final Date actual, final String fieldDescription,
        final int fieldValue) {
    return new ShouldBeWithin(actual, fieldDescription, fieldValue);
}
 
开发者ID:subes,项目名称:invesdwin-util,代码行数:5,代码来源:ShouldBeWithin.java


示例16: shouldBeNullOrBlank

import org.assertj.core.error.ErrorMessageFactory; //导入依赖的package包/类
public static ErrorMessageFactory shouldBeNullOrBlank(final Object actual) {
    return new ShouldBeNullOrBlank(actual);
}
 
开发者ID:subes,项目名称:invesdwin-util,代码行数:4,代码来源:ShouldBeNullOrBlank.java


示例17: shouldNotBeBlank

import org.assertj.core.error.ErrorMessageFactory; //导入依赖的package包/类
public static ErrorMessageFactory shouldNotBeBlank() {
    return INSTANCE;
}
 
开发者ID:subes,项目名称:invesdwin-util,代码行数:4,代码来源:ShouldNotBeBlank.java


示例18: shouldBeBlank

import org.assertj.core.error.ErrorMessageFactory; //导入依赖的package包/类
public static ErrorMessageFactory shouldBeBlank(final Object actual) {
    return new ShouldBeBlank(actual);
}
 
开发者ID:subes,项目名称:invesdwin-util,代码行数:4,代码来源:ShouldBeBlank.java


示例19: shouldHaveNoParameters

import org.assertj.core.error.ErrorMessageFactory; //导入依赖的package包/类
public static ErrorMessageFactory shouldHaveNoParameters(Object actual, Set<String> parameterNames) {
  String parametersDescription = parameterNames.size() == 1 ? parameterNames.iterator().next()
      : parameterNames.toString();
  return new ShouldHaveParameter(SHOULD_HAVE_NO_PARAMETERS, actual, parametersDescription);
}
 
开发者ID:joel-costigliola,项目名称:assertj-core,代码行数:6,代码来源:ShouldHaveParameter.java


示例20: shouldHaveScheme

import org.assertj.core.error.ErrorMessageFactory; //导入依赖的package包/类
public static ErrorMessageFactory shouldHaveScheme(URI actual, String expectedScheme) {
  return new ShouldHaveScheme(actual, expectedScheme);
}
 
开发者ID:joel-costigliola,项目名称:assertj-core,代码行数:4,代码来源:ShouldHaveScheme.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Java UserRepresentation类代码示例发布时间:2022-05-22
下一篇:
Java Substituter类代码示例发布时间: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