Skip to content

Sonar-Fix: Add assertion to testFindAll() in PostgresIntegrationTests#2

Open
meysholdt wants to merge 8 commits intomainfrom
sonar-fix/java-S2699
Open

Sonar-Fix: Add assertion to testFindAll() in PostgresIntegrationTests#2
meysholdt wants to merge 8 commits intomainfrom
sonar-fix/java-S2699

Conversation

@meysholdt
Copy link
Copy Markdown
Collaborator

SonarQube Issue

Field Value
Issue View in SonarQube Cloud
Rule java:S2699View rule
Severity BLOCKER
Type ADAPTABLE
Message Add at least one assertion to this test case.

What changed

Replaced the bare vets.findAll() call in testFindAll() with assertThat(vets.findAll()).isNotEmpty(), using the AssertJ style already established in the same test class. This satisfies rule S2699 by verifying the repository actually returns data, rather than only checking that no exception is thrown.

Verification

  • ./mvnw compile test passes
  • Fix is minimal and preserves existing behavior

meysholdt and others added 8 commits February 26, 2026 11:40
Co-authored-by: Ona <no-reply@ona.com>
Co-authored-by: Ona <no-reply@ona.com>
Co-authored-by: Ona <no-reply@ona.com>
Co-authored-by: Ona <no-reply@ona.com>
Co-authored-by: Ona <no-reply@ona.com>
Co-authored-by: Ona <no-reply@ona.com>
Co-authored-by: Ona <no-reply@ona.com>
@sonarqubecloud
Copy link
Copy Markdown

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