assertj-automation icon indicating copy to clipboard operation
assertj-automation copied to clipboard

Migrate to safe-logging:preconditions-assertj

Open ash211 opened this issue 1 year ago • 0 comments

What happened?

This library creates a PR that fails to compile:

Screenshot 2024-06-07 at 3 01 22 PM Screenshot 2024-06-07 at 3 01 13 PM

Ideally, these refactors would only produce changes that compile.

What did you want to happen?

Instead, this code ought to be using the more idiomatic safe-logging:preconditions-assertj library: https://github.com/palantir/safe-logging/tree/develop/preconditions-assertj/src/main/java/com/palantir/logsafe/testing

Here is the change I manually created:

Screenshot 2024-06-07 at 3 06 43 PM

I don't expect assertj-automation to split the .hasMessage() into .hasLogMessage() and .containsArgs(), but I do think it should have introduced a usage of assertThatLoggableExceptionThrownBy() here.

ash211 avatar Jun 07 '24 22:06 ash211