Codota Logo
org.assertj.core.api
Code IndexAdd Codota to your IDE (free)

How to use org.assertj.core.api

Best Java code snippets using org.assertj.core.api (Showing top 20 results out of 11,376)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ScheduledThreadPoolExecutor s =
  • Codota Iconnew ScheduledThreadPoolExecutor(corePoolSize)
  • Codota IconThreadFactory threadFactory;new ScheduledThreadPoolExecutor(corePoolSize, threadFactory)
  • Codota IconString str;new ScheduledThreadPoolExecutor(1, new ThreadFactoryBuilder().setNameFormat(str).build())
  • Smart code suggestions by Codota
}
origin: org.assertj/assertj-core

/**
 * Returns a copy of list of soft assertions collected errors.
 * @return a copy of list of soft assertions collected errors.
 */
public List<Throwable> errorsCollected() {
 return decorateErrorsCollected(proxies.errorsCollected());
}
origin: org.assertj/assertj-core

@SuppressWarnings({ "rawtypes", "unchecked" })
@Override
SELF withAssertionState(AbstractAssert assertInstance) {
 if (assertInstance instanceof AbstractObjectAssert) {
  AbstractObjectAssert objectAssert = (AbstractObjectAssert) assertInstance;
  return (SELF) super.withAssertionState(assertInstance).withTypeComparator(objectAssert.comparatorByType)
                             .withComparatorByPropertyOrField(objectAssert.comparatorByPropertyOrField);
 }
 return super.withAssertionState(assertInstance);
}
origin: org.assertj/assertj-core

@Override
public ListAssert<ELEMENT> isEqualTo(Object expected) {
 if (actual instanceof ListFromStream && asListFromStream().stream == expected) {
  return myself;
 }
 return super.isEqualTo(expected);
}
origin: square/leakcanary

@Test public void findsExpectedRef() {
 List<TrackedReference> trackedReferences = findTrackedReferences(ASYNC_TASK_M);
 assertThat(trackedReferences).hasSize(1);
 TrackedReference firstRef = trackedReferences.get(0);
 assertThat(firstRef.key).isEqualTo(ASYNC_TASK_M.referenceKey);
 assertThat(firstRef.className).isEqualTo("com.example.leakcanary.MainActivity");
}
origin: android10/Android-CleanArchitecture

 @Test
 public void testUserConstructorHappyCase() {
  final int userId = user.getUserId();

  assertThat(userId).isEqualTo(FAKE_USER_ID);
 }
}
origin: prestodb/presto

  private static void assertMergeHiveColumnStatistics(HiveColumnStatistics first, HiveColumnStatistics second, HiveColumnStatistics expected)
  {
    assertThat(merge(first, second)).isEqualTo(expected);
    assertThat(merge(second, first)).isEqualTo(expected);
  }
}
origin: prestodb/presto

  public void waitForPrompt()
  {
    assertThat(nextOutputToken()).matches(PRESTO_PROMPT_PATTERN);
  }
}
origin: prestodb/presto

private static void assertThatStatisticsAreNotPresent(BasicStatistics statistics)
{
  assertThat(statistics.getNumRows()).isNotPresent();
  assertThat(statistics.getNumFiles()).isNotPresent();
  assertThat(statistics.getRawDataSize()).isNotPresent();
  assertThat(statistics.getTotalSize()).isNotPresent();
}
origin: prestodb/presto

private static void assertThatStatisticsArePresent(BasicStatistics statistics)
{
  assertThat(statistics.getNumRows()).isPresent();
  assertThat(statistics.getNumFiles()).isPresent();
  assertThat(statistics.getRawDataSize()).isPresent();
  assertThat(statistics.getTotalSize()).isPresent();
}
origin: prestodb/presto

private void assertUnsupportedColumnTypeException(ThrowableAssert.ThrowingCallable callable)
{
  assertThatThrownBy(callable)
      .isInstanceOf(PrestoException.class)
      .hasMessageMatching("Unsupported column type .* for column .*");
}
origin: android10/Android-CleanArchitecture

@Test
public void testBuildUseCaseObservableReturnCorrectResult() {
 useCase.execute(testObserver, Params.EMPTY);
 assertThat(testObserver.valuesCount).isZero();
}
origin: prestodb/presto

private void assertMappingDoesNotMatchDataFormatException(ThrowableAssert.ThrowingCallable callable)
{
  assertThatThrownBy(callable)
      .isInstanceOf(PrestoException.class)
      .hasMessageContaining("Bytes mapping for column 'some_column' does not match dataFormat");
}
origin: prestodb/presto

  private static void assertFails(String fileName, String expectedPattern)
  {
    assertThatThrownBy(() -> parse(fileName)).hasMessageMatching(expectedPattern);
  }
}
origin: org.assertj/assertj-core

@Override
public ProxyableListAssert<ELEMENT> isEqualTo(Object expected) {
 if (actual instanceof ProxyableListAssert.ListFromStream && asListFromStream().stream == expected) {
  return myself;
 }
 return super.isEqualTo(expected);
}
origin: prestodb/presto

private void assertWrongDataFormatException(ThrowableAssert.ThrowingCallable callable)
{
  assertThatThrownBy(callable)
      .isInstanceOf(PrestoException.class)
      .hasMessageMatching("Wrong dataFormat .* specified for column .*");
}
origin: prestodb/presto

private void assertInvalidConversion(Binder binder, String message)
{
  assertThatThrownBy(() -> assertParameter(null, Types.NULL, binder))
      .isInstanceOf(SQLException.class)
      .hasMessageContaining(message);
}
origin: prestodb/presto

private void assertUnsupportedColumnTypeException(ThrowableAssert.ThrowingCallable callable)
{
  assertThatThrownBy(callable)
      .isInstanceOf(PrestoException.class)
      .hasMessageMatching("Unsupported column type .* for column .*");
}
origin: prestodb/presto

  private void assertRuntimeDecodingFailure(ThrowableAssert.ThrowingCallable callable)
  {
    assertThatThrownBy(callable)
        .isInstanceOf(PrestoException.class)
        .hasMessageMatching("could not parse value .* as .* for column .*");
  }
}
origin: prestodb/presto

private void assertUnsupportedColumnTypeException(ThrowableAssert.ThrowingCallable callable)
{
  assertThatThrownBy(callable)
      .isInstanceOf(PrestoException.class)
      .hasMessageMatching("Unsupported column type .* for column .*");
}
origin: prestodb/presto

private void assertUnsupportedColumnTypeException(ThrowingCallable callable)
{
  assertThatThrownBy(callable)
      .isInstanceOf(PrestoException.class)
      .hasMessageMatching("unsupported column type .* for column .*");
}
org.assertj.core.api

Most used classes

  • Assertions
  • AbstractBooleanAssert
  • AbstractCharSequenceAssert
  • AbstractIntegerAssert
  • ListAssert
  • AbstractObjectAssert,
  • AbstractComparableAssert,
  • ObjectAssert,
  • IterableAssert,
  • AbstractLongAssert,
  • MapAssert,
  • AbstractListAssert,
  • AbstractStringAssert,
  • OptionalAssert,
  • AbstractDoubleAssert,
  • AbstractObjectArrayAssert,
  • AbstractIterableAssert,
  • AbstractByteArrayAssert,
  • ObjectArrayAssert
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now