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

assertj-db SoftAssertion doesnt work with assertj-core 3.19.0 #126

Open
willyhalim opened this issue Feb 15, 2021 · 4 comments
Open

assertj-db SoftAssertion doesnt work with assertj-core 3.19.0 #126

willyhalim opened this issue Feb 15, 2021 · 4 comments

Comments

@willyhalim
Copy link

This was ok if i use assertj-core 3.15.0 SoftAssertions , but it breaks in assertj-core 3.19.0 .
Its due to generic return type

 public RequestAssert assertThat(Request actual) {
        return proxy(RequestAssert.class, Request.class, actual);
    }
@VanRoy
Copy link
Member

VanRoy commented Feb 22, 2021

@willyhalim Can you tell me wich version of assertj-db do you use ?

@willyhalim
Copy link
Author

willyhalim commented Feb 23, 2021

Hi , I use assertj db version 2.0.2

My initial observation is the proxy method in assertjdb and assertj core now is returning different generic

Thanks

@VanRoy
Copy link
Member

VanRoy commented Feb 23, 2021

@willyhalim Thanks for the information, can you provide a little snippet of code that permit me to reproduce the issue ?

@willyhalim
Copy link
Author

willyhalim commented Mar 8, 2021

Apologies for the delay

This works with assertj 3.14.0 and assertj db 2.0.2

import org.assertj.core.api.SoftAssertions;
import org.assertj.db.api.RequestAssert;
import org.assertj.db.type.Request;

public class DBAssertions extends SoftAssertions {
    public RequestAssert assertThat(Request actual) {
        return proxy(RequestAssert.class, Request.class, actual);
    }
}

But will have compilation error in assertj 3.19.0 ( due to generic return type is changed )

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

No branches or pull requests

2 participants