Skip to content

Truth 0.36

Compare
Choose a tag to compare
@cpovirk cpovirk released this 21 Sep 00:21
· 927 commits to master since this release
  • Delete the *Verb* types and associated classes (after migrating Proto-Truth).
  • Delete ExpectationGatherer.
  • Deprecate Subject.failureStrategy, introducing more Subject.fail* methods to take its place.
  • Deprecate Truth.THROW_ASSERTION_ERROR and TruthJUnit.throwAssumptionError(). Users should use Truth.assert_() and TruthJUnit.assume() (and methods like fail() and about(...).that(...) on the resulting objects).
  • Deprecate SubjectFactory and CustomSubjectBuilderFactory, introducing nested types Subject.Factory and CustomSubjectBuilder.Factory to take their place. The nested types accept new type FailureMetadata rather than FailureStrategy, and our Subject classes have been updated accordingly. The main benefit is that, once you update your Subject constructors to accept FailureMetadata, you can expose a Subject.Factory, and it can usually be implemented with a method reference: return FooSubject::new;.