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


Java Failures类代码示例

本文整理汇总了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));
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:16,代码来源:CompositeQueryFilterAssert.java

示例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;
}
 
开发者ID:joel-costigliola,项目名称:assertj-core,代码行数:10,代码来源:DoublesBaseTest.java

示例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;
}
 
开发者ID:joel-costigliola,项目名称:assertj-neo4j,代码行数:14,代码来源:RelationshipAssert.java

示例4: withThreadDumpOnError

import org.assertj.core.internal.Failures; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
@CheckReturnValue
public SELF withThreadDumpOnError() {
  Failures.instance().enablePrintThreadDump();
  return myself;
}
 
开发者ID:joel-costigliola,项目名称:assertj-core,代码行数:8,代码来源:AbstractAssert.java

示例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;
}
 
开发者ID:joel-costigliola,项目名称:assertj-core,代码行数:10,代码来源:StringsBaseTest.java

示例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;
}
 
开发者ID:joel-costigliola,项目名称:assertj-core,代码行数:9,代码来源:InputStreamsBaseTest.java

示例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;
}
 
开发者ID:joel-costigliola,项目名称:assertj-core,代码行数:8,代码来源:ConditionsBaseTest.java

示例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;
}
 
开发者ID:joel-costigliola,项目名称:assertj-core,代码行数:10,代码来源:CharactersBaseTest.java

示例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;
}
 
开发者ID:joel-costigliola,项目名称:assertj-core,代码行数:10,代码来源:ShortsBaseTest.java

示例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;
}
 
开发者ID:joel-costigliola,项目名称:assertj-core,代码行数:10,代码来源:ComparablesBaseTest.java

示例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;
}
 
开发者ID:joel-costigliola,项目名称:assertj-core,代码行数:10,代码来源:ListsBaseTest.java

示例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));
  }
}
 
开发者ID:joel-costigliola,项目名称:assertj-core,代码行数:10,代码来源:CustomAsserts_filter_stacktrace_Test.java

示例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;
}
 
开发者ID:joel-costigliola,项目名称:assertj-core,代码行数:10,代码来源:IntegersBaseTest.java

示例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();
}
 
开发者ID:joel-costigliola,项目名称:assertj-core,代码行数:12,代码来源:IterablesBaseTest.java


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