org.assertj.core.api.Assertions.anyOf()方法的使用及代码示例

x33g5p2x  于2022-01-15 转载在 其他  
字(3.3k)|赞(0)|评价(0)|浏览(110)

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

Assertions.anyOf介绍

[英]Creates a new AnyOf
[中]创建新的AnyOf

代码示例

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

/**
 * Creates a new <code>{@link AnyOf}</code>
 *
 * @param <T> the type of object the given condition accept.
 * @param conditions the conditions to evaluate.
 * @return the created {@code AnyOf}.
 * @throws NullPointerException if the given iterable is {@code null}.
 * @throws NullPointerException if any of the elements in the given iterable is {@code null}.
 */
default <T> Condition<T> anyOf(final Iterable<? extends Condition<? super T>> conditions) {
 return Assertions.anyOf(conditions);
}

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

/**
 * Only delegate to {@link AnyOf#anyOf(Condition...)} so that Assertions offers a full feature entry point to all
 * AssertJ features (but you can use {@link AnyOf} if you prefer).
 * <p>
 * Typical usage (<code>jedi</code> and <code>sith</code> are {@link Condition}) :
 *
 * <pre><code class='java'> assertThat(&quot;Vader&quot;).is(anyOf(jedi, sith));</code></pre>
 *
 * @param <T> the type of object the given condition accept.
 * @param conditions the conditions to evaluate.
 * @return the created {@code AnyOf}.
 */
default <T> Condition<T> anyOf(@SuppressWarnings("unchecked") final Condition<? super T>... conditions) {
 return Assertions.anyOf(conditions);
}

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

/**
 * Creates a new <code>{@link AnyOf}</code>
 *
 * @param <T> the type of object the given condition accept.
 * @param conditions the conditions to evaluate.
 * @return the created {@code AnyOf}.
 * @throws NullPointerException if the given iterable is {@code null}.
 * @throws NullPointerException if any of the elements in the given iterable is {@code null}.
 */
default <T> Condition<T> anyOf(final Iterable<? extends Condition<? super T>> conditions) {
 return Assertions.anyOf(conditions);
}

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

/**
 * Only delegate to {@link AnyOf#anyOf(Condition...)} so that Assertions offers a full feature entry point to all
 * AssertJ features (but you can use {@link AnyOf} if you prefer).
 * <p>
 * Typical usage (<code>jedi</code> and <code>sith</code> are {@link Condition}) :
 *
 * <pre><code class='java'> assertThat(&quot;Vader&quot;).is(anyOf(jedi, sith));</code></pre>
 *
 * @param <T> the type of object the given condition accept.
 * @param conditions the conditions to evaluate.
 * @return the created {@code AnyOf}.
 */
default <T> Condition<T> anyOf(@SuppressWarnings("unchecked") final Condition<? super T>... conditions) {
 return Assertions.anyOf(conditions);
}

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

/**
 * Delegate call to {@link org.assertj.core.api.Assertions#anyOf(Iterable)}
 */
default public <T> Condition<T> anyOf(final Iterable<? extends Condition<? super T>> conditions) {
 return Assertions.anyOf(conditions);
}

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

/**
 * Delegate call to {@link org.assertj.core.api.Assertions#anyOf(Condition[])}
 */
default public <T> Condition<T> anyOf(@SuppressWarnings("unchecked") final Condition<? super T>... conditions) {
 return Assertions.anyOf(conditions);
}

相关文章