本文整理汇总了Java中org.assertj.core.internal.Failures类的典型用法代码示例。如果您正苦于以下问题:Java Failures类的具体用法?Java Failures怎么用?Java Failures使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Failures类属于org.assertj.core.internal包,在下文中一共展示了Failures类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: anyFilterMatches
import org.assertj.core.internal.Failures; //导入依赖的package包/类
private CompositeQueryFilterAssert anyFilterMatches(@NonNull final Predicate<IQueryFilter> p)
{
isNotNull();
@SuppressWarnings("unchecked")
final List<IQueryFilter> filters = actual.getFilters();
for (final IQueryFilter filter : filters)
{
if (p.test(filter))
{
return this;
}
}
throw Failures.instance().failure(info, elementsShouldSatisfyAny(actual));
}
示例2: setUp
import org.assertj.core.internal.Failures; //导入依赖的package包/类
@Before
public void setUp() {
failures = spy(new Failures());
doubles = new Doubles();
doubles.setFailures(failures);
absValueComparisonStrategy = new ComparatorBasedComparisonStrategy(new AbsValueComparator<Double>());
doublesWithAbsValueComparisonStrategy = new Doubles(absValueComparisonStrategy);
doublesWithAbsValueComparisonStrategy.failures = failures;
}
示例3: doesNotEndWithNode
import org.assertj.core.internal.Failures; //导入依赖的package包/类
public RelationshipAssert doesNotEndWithNode(Node node) {
Objects.instance().assertNotNull(info, actual);
Node actualEndNode = actual.getEndNode();
checkActualRelationshipNode(actualEndNode, "The actual end node should not be null");
checkArgumentNode(node, "The end node to look for should not be null");
if (actualEndNode.equals(node)) {
throw Failures.instance().failure(info, shouldNotEndWithNode(actual, node));
}
return this;
}
示例4: withThreadDumpOnError
import org.assertj.core.internal.Failures; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
@CheckReturnValue
public SELF withThreadDumpOnError() {
Failures.instance().enablePrintThreadDump();
return myself;
}
示例5: setUp
import org.assertj.core.internal.Failures; //导入依赖的package包/类
@Before
public void setUp() {
failures = spy(new Failures());
strings = new Strings();
strings.failures = failures;
comparisonStrategy = new ComparatorBasedComparisonStrategy(CaseInsensitiveStringComparator.instance);
stringsWithCaseInsensitiveComparisonStrategy = new Strings(comparisonStrategy);
stringsWithCaseInsensitiveComparisonStrategy.failures = failures;
}
示例6: setUp
import org.assertj.core.internal.Failures; //导入依赖的package包/类
@Before
public void setUp() {
diff = mock(Diff.class);
failures = spy(new Failures());
inputStreams = new InputStreams();
inputStreams.diff = diff;
inputStreams.failures = failures;
}
示例7: setUp
import org.assertj.core.internal.Failures; //导入依赖的package包/类
@Before
public void setUp() {
failures = spy(new Failures());
condition = new TestCondition<>();
conditions = new Conditions();
conditions.failures = failures;
}
示例8: setUp
import org.assertj.core.internal.Failures; //导入依赖的package包/类
@Before
public void setUp() {
failures = spy(new Failures());
characters = new Characters();
characters.failures = failures;
caseInsensitiveComparisonStrategy = new ComparatorBasedComparisonStrategy(CaseInsensitiveCharacterComparator.instance);
charactersWithCaseInsensitiveComparisonStrategy = new Characters(caseInsensitiveComparisonStrategy);
charactersWithCaseInsensitiveComparisonStrategy.failures = failures;
}
示例9: setUp
import org.assertj.core.internal.Failures; //导入依赖的package包/类
@Before
public void setUp() {
failures = spy(new Failures());
shorts = new Shorts();
shorts.setFailures(failures);
absValueComparisonStrategy = new ComparatorBasedComparisonStrategy(new AbsValueComparator<Short>());
shortsWithAbsValueComparisonStrategy = new Shorts(absValueComparisonStrategy);
shortsWithAbsValueComparisonStrategy.failures = failures;
}
示例10: setUp
import org.assertj.core.internal.Failures; //导入依赖的package包/类
@Before
public void setUp() {
failures = spy(new Failures());
comparables = new Comparables();
comparables.failures = failures;
customComparisonStrategy = new ComparatorBasedComparisonStrategy(comparatorForCustomComparisonStrategy());
comparablesWithCustomComparisonStrategy = new Comparables(customComparisonStrategy);
comparablesWithCustomComparisonStrategy.failures = failures;
}
示例11: setUp
import org.assertj.core.internal.Failures; //导入依赖的package包/类
@Before
public void setUp() {
failures = spy(new Failures());
lists = new Lists();
lists.failures = failures;
comparisonStrategy = new ComparatorBasedComparisonStrategy(CaseInsensitiveStringComparator.instance);
listsWithCaseInsensitiveComparisonStrategy = new Lists(comparisonStrategy);
listsWithCaseInsensitiveComparisonStrategy.failures = failures;
}
示例12: should_not_filter_when_global_remove_option_is_disabled
import org.assertj.core.internal.Failures; //导入依赖的package包/类
@Test
public void should_not_filter_when_global_remove_option_is_disabled() {
Failures.instance().setRemoveAssertJRelatedElementsFromStackTrace(false);
try {
new CustomAssert("").fail();
} catch (AssertionError e) {
assertThat(e.getStackTrace()).areAtLeastOne(elementOf(CustomAssert.class));
}
}
示例13: setUp
import org.assertj.core.internal.Failures; //导入依赖的package包/类
@Before
public void setUp() {
Failures.instance().setRemoveAssertJRelatedElementsFromStackTrace(false);
description = new TestDescription("Jedi");
factory = (ShouldBeEqual) shouldBeEqual("Luke", "Yoda", new StandardRepresentation());
constructorInvoker = mock(ConstructorInvoker.class);
factory.constructorInvoker = constructorInvoker;
}
开发者ID:joel-costigliola,项目名称:assertj-core,代码行数:9,代码来源:ShouldBeEqual_newAssertionError_without_JUnit_and_OTA4J_Test.java
示例14: setUp
import org.assertj.core.internal.Failures; //导入依赖的package包/类
@Before
public void setUp() {
failures = spy(new Failures());
integers = new Integers();
integers.setFailures(failures);
absValueComparisonStrategy = new ComparatorBasedComparisonStrategy(new AbsValueComparator<Integer>());
integersWithAbsValueComparisonStrategy = new Integers(absValueComparisonStrategy);
integersWithAbsValueComparisonStrategy.failures = failures;
}
示例15: setUp
import org.assertj.core.internal.Failures; //导入依赖的package包/类
@Before
public void setUp() {
actual = newArrayList("Luke", "Yoda", "Leia");
failures = spy(new Failures());
iterables = new Iterables();
iterables.failures = failures;
comparisonStrategy = new ComparatorBasedComparisonStrategy(CaseInsensitiveStringComparator.instance);
iterablesWithCaseInsensitiveComparisonStrategy = new Iterables(comparisonStrategy);
iterablesWithCaseInsensitiveComparisonStrategy.failures = failures;
info = someInfo();
}