Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please provide an equals() for SimpleResult #10948

Closed
SebastianDietrich opened this issue May 9, 2021 · 4 comments · Fixed by #11827
Closed

Please provide an equals() for SimpleResult #10948

SebastianDietrich opened this issue May 9, 2021 · 4 comments · Fixed by #11827

Comments

@SebastianDietrich
Copy link

I'd like to write a unit-test to check if a converter works as expected. Since the convertToModel method is supposed to return Result, I need to assert that Results against my expectations. My converter uses Result.error() or Result.ok() to instantiate such a result, which is in both cases of type SimpleResult.

Unfortunately SimpleResult has neither an equals() nor a simple get() method --> assertEquals(Result.ok(), ...) fails since Object.equals() checks for identity.

Please provide an equals or simple get() method for SimpleResult, so it can be tested against in unit-tests.

Versions:

- Vaadin / Flow version: 19.0.6
- Java version: 11
@denis-anisimov denis-anisimov self-assigned this Sep 13, 2021
denis-anisimov pushed a commit that referenced this issue Sep 13, 2021
denis-anisimov pushed a commit that referenced this issue Sep 14, 2021
vaadin-bot added a commit that referenced this issue Sep 14, 2021
vaadin-bot added a commit that referenced this issue Sep 14, 2021
vaadin-bot added a commit that referenced this issue Sep 14, 2021
vaadin-bot added a commit that referenced this issue Sep 14, 2021
@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with platform 22.0.0.alpha4 and is also targeting the upcoming stable 22.0.0 version.

@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with platform 21.0.2.

@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with platform 14.7.1.

@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with platform 20.0.8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment