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

项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:ObjectContentAssert.java   
/**
 * Verifies that the actual value is a map, and returns a map assertion, to allow
 * chaining of map-specific assertions from this call.
 * @return a map assertion object
 */
@SuppressWarnings("unchecked")
public AbstractMapAssert<?, ?, Object, Object> asMap() {
    Objects.instance().assertIsInstanceOf(this.info, this.actual, Map.class);
    return Assertions.assertThat((Map<Object, Object>) this.actual);
}
项目:spring-boot-concourse    文件:ObjectContentAssert.java   
/**
 * Verifies that the actual value is a map, and returns a map assertion, to allow
 * chaining of map-specific assertions from this call.
 * @return a map assertion object
 */
@SuppressWarnings("unchecked")
public AbstractMapAssert<?, ?, Object, Object> asMap() {
    Objects.instance().assertIsInstanceOf(this.info, this.actual, Map.class);
    return Assertions.assertThat((Map<Object, Object>) this.actual);
}
项目:fluent-bdd    文件:WithFluentAssertJ.java   
/**
 * Delegate call to {@link org.assertj.core.api.Assertions#assertThat(Map)}
 */
default <K, V> AbstractMapAssert<?, ? extends Map<K, V>, K, V> then(Map<K, V> actual) {
    fluentBdd().verification.recordThen(this);
    return DELEGATE.assertThat(actual);
}
项目:fluent-bdd    文件:WithFluentAssertJ.java   
/**
 * Delegate call to {@link org.assertj.core.api.Assertions#assertThat(Map)}
 */
default <K, V> AbstractMapAssert<?, ? extends Map<K, V>, K, V> and(Map<K, V> actual) {
    fluentBdd().verification.recordThen(this);
    return DELEGATE.assertThat(actual);
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:JsonContentAssert.java   
/**
 * Extract the map 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 map
 */
@SuppressWarnings("unchecked")
public AbstractMapAssert<?, ?, Object, Object> extractingJsonPathMapValue(
        CharSequence expression, Object... args) {
    return Assertions.assertThat(
            extractingJsonPathValue(expression, args, Map.class, "a map"));
}
项目:spring-boot-concourse    文件:JsonContentAssert.java   
/**
 * Extract the map 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 map
 */
@SuppressWarnings("unchecked")
public AbstractMapAssert<?, ?, Object, Object> extractingJsonPathMapValue(
        CharSequence expression, Object... args) {
    return Assertions.assertThat(
            extractingJsonPathValue(expression, args, Map.class, "a map"));
}
项目: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 <K, V> AbstractMapAssert<?, ? extends Map<K, V>, K, V> expect(Map<K, V> actual) {
  return assertThat(actual);
}