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


Java AbstractAssert类代码示例

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


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

示例1: navigationDescription

import org.assertj.core.api.AbstractAssert; //导入依赖的package包/类
/**
 * Build a string representing a navigation from given assert to given property name.
 */
static String navigationDescription(AbstractAssert<?, ?> as, String propertyName) {
    String text = as.descriptionText();
    if (Strings.isNullOrEmpty(text)) {
        text = removeAssert(as.getClass().getSimpleName());
    }
    return text + " " + propertyName;
}
 
开发者ID:rpau,项目名称:javalang-compiler,代码行数:11,代码来源:AssertUtil.java

示例2: should_delegate_to_overridingErrorMessage

import org.assertj.core.api.AbstractAssert; //导入依赖的package包/类
@Test
public void should_delegate_to_overridingErrorMessage() {
  AbstractAssert<?, ?> suT = spy(Assertions.assertThat("test"));

  suT.withFailMessage("test", "eins");

  verify(suT).overridingErrorMessage("test", "eins");
}
 
开发者ID:joel-costigliola,项目名称:assertj-core,代码行数:9,代码来源:AbstractAssert_withFailMessage_Test.java

示例3: assertThat

import org.assertj.core.api.AbstractAssert; //导入依赖的package包/类
public static AbstractAssert<?, IExecutionGraph> assertThat(IExecutionGraph actual) {
    return new ExecutionGraphAssert(actual, ExecutionGraphAssert.class);
}
 
开发者ID:DataArt,项目名称:CalculationEngine,代码行数:4,代码来源:ExecutionGraphAssert.java

示例4: assertThat

import org.assertj.core.api.AbstractAssert; //导入依赖的package包/类
/**
 * Helper for list assertions.
 */
static <ELEMENT, ELEMENT_ASSERT extends AbstractAssert<ELEMENT_ASSERT, ELEMENT>> ExtListAssert<ELEMENT_ASSERT, ELEMENT> assertThat(
        List<? extends ELEMENT> actual, Class<ELEMENT_ASSERT> assertClass, String description) {
    return (ExtListAssert<ELEMENT_ASSERT, ELEMENT>) new ExtListAssert<ELEMENT_ASSERT, ELEMENT>(actual, assertClass)
            .as(description);
}
 
开发者ID:rpau,项目名称:javalang-compiler,代码行数:9,代码来源:AssertUtil.java

示例5: should_not_fail_when_equals_exceptions_is_deactivated

import org.assertj.core.api.AbstractAssert; //导入依赖的package包/类
@Test
@SuppressWarnings("deprecation")
public void should_not_fail_when_equals_exceptions_is_deactivated() {
  AbstractAssert.throwUnsupportedExceptionOnEquals = false;
  assertions.equals("anotherString");
}
 
开发者ID:joel-costigliola,项目名称:assertj-core,代码行数:7,代码来源:AbstractAssert_equal_hashCode_Test.java

示例6: assertThat

import org.assertj.core.api.AbstractAssert; //导入依赖的package包/类
/**
 * Delegate call to public static <ACTUAL,ELEMENT,ELEMENT_ASSERT> org.assertj.core.api.ClassBasedNavigableIterableAssert<?, ACTUAL, ELEMENT, ELEMENT_ASSERT> org.assertj.core.api.Assertions.assertThat(ACTUAL,java.lang.Class<ELEMENT_ASSERT>)
 * {@link org.assertj.core.api.Assertions#assertThat(java.lang.Iterable,java.lang.Class)}
 */
default <ACTUAL extends Iterable<? extends ELEMENT>,ELEMENT,ELEMENT_ASSERT extends AbstractAssert<ELEMENT_ASSERT, ELEMENT>> ClassBasedNavigableIterableAssert<?, ACTUAL, ELEMENT, ELEMENT_ASSERT> assertThat(ACTUAL arg0, Class<ELEMENT_ASSERT> arg1) {
    return Assertions.assertThat(arg0, arg1);
}
 
开发者ID:aro-tech,项目名称:extended-mockito,代码行数:8,代码来源:AssertJ.java


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