Skip to content

Conversation

@rferreira
Copy link
Collaborator

…ons in tests

@rferreira rferreira requested a review from Copilot November 3, 2025 03:41
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR modernizes Java code by using diamond operator syntax for type inference and improves test assertions. It also exposes previously private nested classes for testing purposes.

  • Replaced explicit generic type declarations with diamond operator (<>) in HashMap instantiations
  • Changed assertions from assertTrue(collection.size() > 0) to assertFalse(collection.isEmpty()) for better readability
  • Made nested User and ApiKey classes public to enable additional test coverage

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
ScaniiClientTest.java Updated HashMap instantiations to use diamond operator and enhanced account info test with assertions for nested ApiKey properties
ScaniiAccountInfo.java Made nested User and ApiKey classes public and added @SuppressWarnings("unused") annotation
Comments suppressed due to low confidence (1)

src/test/java/com/uvasoftware/scanii/ScaniiClientTest.java:379

  • Actual argument type 'Integer' is incompatible with expected argument type 'String'.
    var firstKey = account.getKeys().get(0);

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@rferreira rferreira merged commit 72db509 into main Nov 3, 2025
12 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