Skip to content

Conversation

@commonquail
Copy link
Contributor

A number of specifications expressed with AssertJ invoke the API incorrectly, leaving the assertions ineffectual. Fixing these reveals that several test cases express minor expectations that are not met by the implementation and require review for correctness -- there is strong evidence that the expectations, not the implementation, are in error, namely by way of commit.id being default and mutually exclusive with commit.id.full. Additionally, some expectations can trivially be expressed with more AssertJ-native assertion operators.

This PR restores function to the nonfunctional expectations, attempts to correct the resulting broken tests, and superficially rewrites AssertJ-expectations into more native variants.

A substantial number of AssertJ usages lack assertion operators and
therefore are ineffectual. Rewrite these assetions into functional
AssertJ-native variants. Doing so induces a score of failures from
misspecified tests so mark those fallible pending correction.
Correct and restore all the tests marked fallible by commit e7cf70a (Fix
AssertJ API usage, 2024-02-23).

Errors predominantly revolve around expecting the presence of the
property "commit.id.full" instead of the mutually exclusive default of
"commit.id", so for those tests we just flip the expectation without
further consideration. In at least one case we clearly expect the
presence of "commit.id.full" so for that test we retain the expectation
and instead override the commit ID generation mode.
A few AssertJ assertions can be expressed with more AssertJ-native
assertion operators; do so.
@commonquail
Copy link
Contributor Author

Oh, this is #102. Never mind.

@TheSnoozer
Copy link
Contributor

Thanks for your contribution! Indeed that was recently improved in the MR you linked.
Thanks for the PR anyways :-)

@TheSnoozer TheSnoozer modified the milestones: 6.0.0, 6.0.0-rc.7 Mar 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants