本文整理汇总了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;
}
示例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");
}
示例3: assertThat
import org.assertj.core.api.AbstractAssert; //导入依赖的package包/类
public static AbstractAssert<?, IExecutionGraph> assertThat(IExecutionGraph actual) {
return new ExecutionGraphAssert(actual, ExecutionGraphAssert.class);
}
示例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);
}
示例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");
}
示例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);
}