org.assertj.core.internal.Objects.isOfOneOfGivenTypes()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(3.9k)|赞(0)|评价(0)|浏览(188)

本文整理了Java中org.assertj.core.internal.Objects.isOfOneOfGivenTypes()方法的一些代码示例,展示了Objects.isOfOneOfGivenTypes()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Objects.isOfOneOfGivenTypes()方法的具体详情如下:
包路径:org.assertj.core.internal.Objects
类名称:Objects
方法名:isOfOneOfGivenTypes

Objects.isOfOneOfGivenTypes介绍

暂无

代码示例

代码示例来源:origin: org.assertj/assertj-core

  1. /**
  2. * Verifies that the actual value type is in given types.
  3. *
  4. * @param info contains information about the assertion.
  5. * @param actual the given object.
  6. * @param types the types to check the actual value against.
  7. * @throws AssertionError if the actual value type is in given type.
  8. * @throws NullPointerException if the actual value is null.
  9. * @throws NullPointerException if the given types is null.
  10. */
  11. public void assertIsOfAnyClassIn(AssertionInfo info, Object actual, Class<?>[] types) {
  12. boolean itemInArray = isOfOneOfGivenTypes(actual, types, info);
  13. if (!itemInArray) throw failures.failure(info, shouldBeOfClassIn(actual, types));
  14. }

代码示例来源:origin: org.assertj/assertj-core

  1. /**
  2. * Verifies that the actual value type is not in given types.
  3. *
  4. * @param info contains information about the assertion.
  5. * @param actual the given object.
  6. * @param types the types to check the actual value against.
  7. * @throws AssertionError if the actual value type is in given type.
  8. * @throws NullPointerException if the actual value is null.
  9. * @throws NullPointerException if the given types is null.
  10. */
  11. public void assertIsNotOfAnyClassIn(AssertionInfo info, Object actual, Class<?>[] types) {
  12. boolean itemInArray = isOfOneOfGivenTypes(actual, types, info);
  13. if (itemInArray) throw failures.failure(info, shouldNotBeOfClassIn(actual, types));
  14. }

代码示例来源:origin: joel-costigliola/assertj-core

  1. /**
  2. * Verifies that the actual value type is in given types.
  3. *
  4. * @param info contains information about the assertion.
  5. * @param actual the given object.
  6. * @param types the types to check the actual value against.
  7. * @throws AssertionError if the actual value type is in given type.
  8. * @throws NullPointerException if the actual value is null.
  9. * @throws NullPointerException if the given types is null.
  10. */
  11. public void assertIsOfAnyClassIn(AssertionInfo info, Object actual, Class<?>[] types) {
  12. boolean itemInArray = isOfOneOfGivenTypes(actual, types, info);
  13. if (!itemInArray) throw failures.failure(info, shouldBeOfClassIn(actual, types));
  14. }

代码示例来源:origin: joel-costigliola/assertj-core

  1. /**
  2. * Verifies that the actual value type is not in given types.
  3. *
  4. * @param info contains information about the assertion.
  5. * @param actual the given object.
  6. * @param types the types to check the actual value against.
  7. * @throws AssertionError if the actual value type is in given type.
  8. * @throws NullPointerException if the actual value is null.
  9. * @throws NullPointerException if the given types is null.
  10. */
  11. public void assertIsNotOfAnyClassIn(AssertionInfo info, Object actual, Class<?>[] types) {
  12. boolean itemInArray = isOfOneOfGivenTypes(actual, types, info);
  13. if (itemInArray) throw failures.failure(info, shouldNotBeOfClassIn(actual, types));
  14. }

代码示例来源:origin: org.assertj/assertj-core-java8

  1. /**
  2. * Verifies that the actual value type is in given types.
  3. *
  4. * @param info contains information about the assertion.
  5. * @param actual the given object.
  6. * @param types the types to check the actual value against.
  7. * @throws AssertionError if the actual value type is in given type.
  8. * @throws NullPointerException if the actual value is null.
  9. * @throws NullPointerException if the given types is null.
  10. */
  11. public void assertIsOfAnyClassIn(AssertionInfo info, Object actual, Class<?>[] types) {
  12. boolean itemInArray = isOfOneOfGivenTypes(actual, types, info);
  13. if (!itemInArray) throw failures.failure(info, shouldBeOfClassIn(actual, types));
  14. }

代码示例来源:origin: org.assertj/assertj-core-java8

  1. /**
  2. * Verifies that the actual value type is not in given types.
  3. *
  4. * @param info contains information about the assertion.
  5. * @param actual the given object.
  6. * @param types the types to check the actual value against.
  7. * @throws AssertionError if the actual value type is in given type.
  8. * @throws NullPointerException if the actual value is null.
  9. * @throws NullPointerException if the given types is null.
  10. */
  11. public void assertIsNotOfAnyClassIn(AssertionInfo info, Object actual, Class<?>[] types) {
  12. boolean itemInArray = isOfOneOfGivenTypes(actual, types, info);
  13. if (itemInArray) throw failures.failure(info, shouldNotBeOfClassIn(actual, types));
  14. }

相关文章