本文整理匯總了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);
}