当前位置: 首页>>代码示例>>Java>>正文


Java AbstractObjectAssert类代码示例

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


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

示例1: then

import org.assertj.core.api.AbstractObjectAssert; //导入依赖的package包/类
/**
 * 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);
}
 
开发者ID:theangrydev,项目名称:fluent-bdd,代码行数:8,代码来源:WithFluentAssertJ.java

示例2: resultOf

import org.assertj.core.api.AbstractObjectAssert; //导入依赖的package包/类
public static <$ActualResult> AbstractObjectAssert<?, $ActualResult> resultOf(
        CheckedSupplier<$ActualResult> whenStep) {
    return assertThat(result(whenStep));
}
 
开发者ID:xapn,项目名称:test-as-you-think,代码行数:5,代码来源:TestAsYouThink.java

示例3: assertAt

import org.assertj.core.api.AbstractObjectAssert; //导入依赖的package包/类
@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;
}
 
开发者ID:michal-michaluk,项目名称:ddd-wro-warehouse,代码行数:7,代码来源:EventsAssert.java

示例4: assertFirst

import org.assertj.core.api.AbstractObjectAssert; //导入依赖的package包/类
public <T> AbstractObjectAssert<?, T> assertFirst(Class<T> type) {
    return this.assertAt(0, type);
}
 
开发者ID:michal-michaluk,项目名称:ddd-wro-warehouse,代码行数:4,代码来源:EventsAssert.java

示例5: assertLast

import org.assertj.core.api.AbstractObjectAssert; //导入依赖的package包/类
public <T> AbstractObjectAssert<?, T> assertLast(Class<T> type) {
    return this.assertAt(events.size() - 1, type);
}
 
开发者ID:michal-michaluk,项目名称:ddd-wro-warehouse,代码行数:4,代码来源:EventsAssert.java

示例6: and

import org.assertj.core.api.AbstractObjectAssert; //导入依赖的package包/类
/**
 * 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);
}
 
开发者ID:theangrydev,项目名称:fluent-bdd,代码行数:8,代码来源:WithFluentAssertJ.java

示例7: minecraftCommand

import org.assertj.core.api.AbstractObjectAssert; //导入依赖的package包/类
private AbstractObjectAssert<?, CommandPartBuffer> minecraftCommand() {
  isNotNull();
  return assertThat(actual.getMinecraftCommand()).as(description("minecraftCommand"));
}
 
开发者ID:Adrodoc55,项目名称:MPL,代码行数:5,代码来源:CommandAssert.java

示例8: assertStat

import org.assertj.core.api.AbstractObjectAssert; //导入依赖的package包/类
private AbstractObjectAssert<?, Number> assertStat(String key) {
  return assertThat((Number) cacheStatistics.getKnownStatistics().get(key).value());
}
 
开发者ID:ehcache,项目名称:ehcache3,代码行数:4,代码来源:DefaultCacheStatisticsTest.java

示例9: assertStat

import org.assertj.core.api.AbstractObjectAssert; //导入依赖的package包/类
private AbstractObjectAssert<?, Number> assertStat(String key) {
  return assertThat((Number) onHeap.getKnownStatistics().get(key).value());
}
 
开发者ID:ehcache,项目名称:ehcache3,代码行数:4,代码来源:DefaultTierStatisticsTest.java

示例10: method

import org.assertj.core.api.AbstractObjectAssert; //导入依赖的package包/类
public AbstractObjectAssert<?, Method> method() {
    return Assertions.assertThat(actual.getMethod()).as(navigationDescription("method"));
}
 
开发者ID:rpau,项目名称:javalang-compiler,代码行数:4,代码来源:MethodSymbolDataAssert.java

示例11: assertThat

import org.assertj.core.api.AbstractObjectAssert; //导入依赖的package包/类
/**
 * 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);
}
 
开发者ID:aro-tech,项目名称:extended-mockito,代码行数:8,代码来源:AssertJ.java

示例12: extractingJsonPathValue

import org.assertj.core.api.AbstractObjectAssert; //导入依赖的package包/类
/**
 * 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));
}
 
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:13,代码来源:JsonContentAssert.java

示例13: extractingJsonPathNumberValue

import org.assertj.core.api.AbstractObjectAssert; //导入依赖的package包/类
/**
 * 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"));
}
 
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:14,代码来源:JsonContentAssert.java

示例14: expect

import org.assertj.core.api.AbstractObjectAssert; //导入依赖的package包/类
/**
 * 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);
}
 
开发者ID:ehcache,项目名称:ehcache3,代码行数:11,代码来源:AbstractCalculationTest.java

示例15: extractingValue

import org.assertj.core.api.AbstractObjectAssert; //导入依赖的package包/类
/**
 * 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());
}
 
开发者ID:joel-costigliola,项目名称:assertj-guava,代码行数:18,代码来源:OptionalAssert.java


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