Java 类org.assertj.core.api.AbstractObjectAssert 实例源码

项目:test-as-you-think    文件:TestAsYouThink.java   
public static <$ActualResult> AbstractObjectAssert<?, $ActualResult> resultOf(
        CheckedSupplier<$ActualResult> whenStep) {
    return assertThat(result(whenStep));
}
项目:ddd-wro-warehouse    文件:EventsAssert.java   
@SuppressWarnings("unchecked")
private <T> AbstractObjectAssert<?, T> assertAt(int index, Class<T> type) {
    AbstractObjectAssert<?, ?> anAssert = Assertions.assertThat(events.get(index));
    anAssert.isInstanceOf(type);
    return (AbstractObjectAssert<?, T>) anAssert;
}
项目:ddd-wro-warehouse    文件:EventsAssert.java   
public <T> AbstractObjectAssert<?, T> assertFirst(Class<T> type) {
    return this.assertAt(0, type);
}
项目:ddd-wro-warehouse    文件:EventsAssert.java   
public <T> AbstractObjectAssert<?, T> assertLast(Class<T> type) {
    return this.assertAt(events.size() - 1, type);
}
项目:fluent-bdd    文件:WithFluentAssertJ.java   
/**
 * Delegate call to {@link org.assertj.core.api.Assertions#assertThat(T)}
 */
default <T> AbstractObjectAssert<?, T> then(T actual) {
    fluentBdd().verification.recordThen(this);
    return DELEGATE.assertThat(actual);
}
项目:fluent-bdd    文件:WithFluentAssertJ.java   
/**
 * Delegate call to {@link org.assertj.core.api.Assertions#assertThat(T)}
 */
default <T> AbstractObjectAssert<?, T> and(T actual) {
    fluentBdd().verification.recordThen(this);
    return DELEGATE.assertThat(actual);
}
项目:MPL    文件:CommandAssert.java   
private AbstractObjectAssert<?, CommandPartBuffer> minecraftCommand() {
  isNotNull();
  return assertThat(actual.getMinecraftCommand()).as(description("minecraftCommand"));
}
项目:ehcache3    文件:DefaultCacheStatisticsTest.java   
private AbstractObjectAssert<?, Number> assertStat(String key) {
  return assertThat((Number) cacheStatistics.getKnownStatistics().get(key).value());
}
项目:ehcache3    文件:DefaultTierStatisticsTest.java   
private AbstractObjectAssert<?, Number> assertStat(String key) {
  return assertThat((Number) onHeap.getKnownStatistics().get(key).value());
}
项目:javalang-compiler    文件:MethodSymbolDataAssert.java   
public AbstractObjectAssert<?, Method> method() {
    return Assertions.assertThat(actual.getMethod()).as(navigationDescription("method"));
}
项目:extended-mockito    文件:AssertJ.java   
/**
 * Delegate call to public static <T> org.assertj.core.api.AbstractObjectAssert<?, T> org.assertj.core.api.Assertions.assertThat(T)
 * {@link org.assertj.core.api.Assertions#assertThat(java.lang.Object)}
 */
default <T> AbstractObjectAssert<?, T> assertThat(T assertion) {
    return Assertions.assertThat(assertion);
}
项目:tdd-mixins-core    文件:AssertJ.java   
/**
 * Delegate call to public static <T> org.assertj.core.api.AbstractObjectAssert<?, T> org.assertj.core.api.Assertions.assertThat(T)
 * {@link org.assertj.core.api.Assertions#assertThat(java.lang.Object)}
 */
default <T> AbstractObjectAssert<?, T> assertThat(T assertion) {
    return Assertions.assertThat(assertion);
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:JsonContentAssert.java   
/**
 * Extract the value at the given JSON path for further object assertions.
 * @param expression the {@link JsonPath} expression
 * @param args arguments to parameterize the {@code JsonPath} expression with, using
 * formatting specifiers defined in {@link String#format(String, Object...)}
 * @return a new assertion object whose object under test is the extracted item
 * @throws AssertionError if the path is not valid
 */
public AbstractObjectAssert<?, Object> extractingJsonPathValue(
        CharSequence expression, Object... args) {
    return Assertions.assertThat(new JsonPathValue(expression, args).getValue(false));
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:JsonContentAssert.java   
/**
 * Extract the number value at the given JSON path for further object assertions.
 * @param expression the {@link JsonPath} expression
 * @param args arguments to parameterize the {@code JsonPath} expression with, using
 * formatting specifiers defined in {@link String#format(String, Object...)}
 * @return a new assertion object whose object under test is the extracted item
 * @throws AssertionError if the path is not valid or does not result in a number
 */
public AbstractObjectAssert<?, Number> extractingJsonPathNumberValue(
        CharSequence expression, Object... args) {
    return Assertions.assertThat(
            extractingJsonPathValue(expression, args, Number.class, "a number"));
}
项目:spring-boot-concourse    文件:JsonContentAssert.java   
/**
 * Extract the value at the given JSON path for further object assertions.
 * @param expression the {@link JsonPath} expression
 * @param args arguments to parameterize the {@code JsonPath} expression with, using
 * formatting specifiers defined in {@link String#format(String, Object...)}
 * @return a new assertion object whose object under test is the extracted item
 * @throws AssertionError if the path is not valid
 */
public AbstractObjectAssert<?, Object> extractingJsonPathValue(
        CharSequence expression, Object... args) {
    return Assertions.assertThat(new JsonPathValue(expression, args).getValue(false));
}
项目:spring-boot-concourse    文件:JsonContentAssert.java   
/**
 * Extract the number value at the given JSON path for further object assertions.
 * @param expression the {@link JsonPath} expression
 * @param args arguments to parameterize the {@code JsonPath} expression with, using
 * formatting specifiers defined in {@link String#format(String, Object...)}
 * @return a new assertion object whose object under test is the extracted item
 * @throws AssertionError if the path is not valid or does not result in a number
 */
public AbstractObjectAssert<?, Number> extractingJsonPathNumberValue(
        CharSequence expression, Object... args) {
    return Assertions.assertThat(
            extractingJsonPathValue(expression, args, Number.class, "a number"));
}
项目:interface-it    文件:AssertJ.java   
/**
 * Delegate call to public static <T> org.assertj.core.api.AbstractObjectAssert<?, T> org.assertj.core.api.Assertions.assertThat(T)
 * {@link org.assertj.core.api.Assertions#assertThat(java.lang.Object)}
 */
default <T> AbstractObjectAssert<?, T> assertThat(T assertion) {
    return Assertions.assertThat(assertion);
}
项目:ehcache3    文件:AbstractCalculationTest.java   
/**
 * A little wrapper over {@code assertThat} that just mention that this what we expect from the test. So if the
 * expectation fails, it's probably the test that is wrong, not the implementation.
 *
 * @param actual actual value
 * @return an AssertJ assertion
 */
protected static <T> AbstractObjectAssert<?, T> expect(T actual) {
  return assertThat(actual);
}
项目:assertj-guava    文件:OptionalAssert.java   
/**
 * Chain assertion on the content of the {@link Optional}.
 * <p>
 * Example :
 *
 * <pre><code class='java'> Optional&lt;Number&gt; optional = Optional.of(12L);
 *
 * assertThat(optional).extractingValue().isInstanceOf(Long.class);</code></pre>
 *
 * @return a new {@link AbstractObjectAssert} for assertions chaining on the content of the Optional.
 * @throws AssertionError if the actual {@link Optional} is {@code null}.
 * @throws AssertionError if the actual {@link Optional} contains a null instance.
 */
public AbstractObjectAssert<?, T> extractingValue() {
  isPresent();
  return assertThat(actual.get());
}