當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。