Skip to content

Latest commit

 

History

History
48 lines (37 loc) · 1.62 KB

File metadata and controls

48 lines (37 loc) · 1.62 KB

Change Log

Version 2.0.0 (2020-02-06)

This release marks a major milestone in that it moves to Truth stable, and migrates to AndroidX.

Migrating

Assertion chaining It used to be possible to write code like

assertThat(layout).isVisible()
  .hasChildCount(4);

Now, this code must be written as

assertThat(layout).isVisible();
assertThat(layout).hasChildCount(4);

Android Studio's Structured Search/Replace can be used effectively to migrate your code.

Truth 1.0 Truth 1.0 introduced significant API changes. See their changelog for migration information.

AndroidX AndroidX is the replacement for the Android Support Library. See their migration guide for details on migrating your application.

Changes

  • Update Truth to version 1.0. This has breaking API changes.
  • Migrate from Android Support Library to AndroidX. This has breaking API changes.
  • Add nullability annotations. All public methods should be properly annotated for optimized interop with Kotlin.
  • Subject methods no longer return a reference to the Subject. This means assertion chaining is no longer possible. This is more in line with how Truth itself works, rather than how AssertJ works.
  • Multiple bug fixes in assertions.

Version 1.1.0 (2018-10-19)

  • Update Truth to version 0.42. This has breaking API changes
  • Update Support Library. This has breaking API changes

Version 1.0.0 (2016-11-27)

Feature parity with AssertJ Android