Skip to content

Improve assertion usage patterns#1032

Merged
Avery-Dunn merged 5 commits into
avdunn/test-standardizationfrom
avdunn/assertion-standardization
Jun 4, 2026
Merged

Improve assertion usage patterns#1032
Avery-Dunn merged 5 commits into
avdunn/test-standardizationfrom
avdunn/assertion-standardization

Conversation

@Avery-Dunn
Copy link
Copy Markdown
Contributor

Based on the changes/branch in this other PR of test improvements: #1031

This PR is meant to handle a minor but widespread code quality issue in our unit tests: JUnit's assertEquals method expects to be given parameters like (expectedValue, actualValue), but about a quarter of the time we passed in (actualValue, expectedValue)

This doesn't affect the actual test behavior in any meaningful way, but can easily create confusion when looking at logs in failing pipelines. This PR should correct the order in every usage of assertEquals

Unrelated to that, this PR also adjusts a couple of integration test classes in order to use existing helpers for some common assertion patterns (mainly validating the existence/absence of tokens in a result).

These changes are more-or-less just stylistic and code quality issues, and will not affect the source code or current test coverage.

@Avery-Dunn Avery-Dunn requested a review from a team as a code owner June 2, 2026 21:30
@Avery-Dunn Avery-Dunn merged commit d54cef4 into avdunn/test-standardization Jun 4, 2026
3 checks passed
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.

1 participant