Skip to content

Fix NuRouteSettings comparison and add unit tests#120

Open
mateussiqueira wants to merge 1 commit into
nubank:masterfrom
mateussiqueira:fix/nu-route-settings-comparison
Open

Fix NuRouteSettings comparison and add unit tests#120
mateussiqueira wants to merge 1 commit into
nubank:masterfrom
mateussiqueira:fix/nu-route-settings-comparison

Conversation

@mateussiqueira
Copy link
Copy Markdown

Aqui está uma sugestão de descrição para o Pull Request em inglês:


Description

This PR fixes the comparison logic for the NuRouteSettings class and adds unit tests to ensure its correctness.

Changes

  • Implemented proper hashCode and equality operator (==) in the NuRouteSettings class.
  • Added unit tests to verify the merging of parameters and the comparison of NuRouteSettings instances.

Motivation and Context

The previous implementation of the NuRouteSettings class had issues with object comparison, causing tests to fail. This fix ensures that NuRouteSettings instances are compared correctly, which is crucial for the functionality of the routing system.

How Has This Been Tested?

  • Added unit tests to check the merging of query, path, and extra parameters.
  • Added unit tests to verify the equality of two NuRouteSettings instances with the same parameters.

Screenshots (if appropriate)

N/A

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Use esta descrição ao criar o Pull Request no seu repositório.

- Implemented proper hashCode and equality operator in NuRouteSettings
- Added unit tests to verify parameter merging and object comparison
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