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

test: migrate ContractOnSettersParametrizedTest to JUnit 5 #4569

Conversation

MartinWitt
Copy link
Collaborator

@MartinWitt MartinWitt commented Jan 23, 2022

#3919
while refactoring, I removed an unused field and moved the fields to the top

 The following has changed in the code:
Replaced junit 4 test annotation with junit 5 test annotation in testContract
Transformed junit4 assert to junit 5 assertion in testContract
public Collection<DynamicTest> data() {
List<DynamicTest> values = new ArrayList<>();
for (CtType<?> t : allInstantiableMetamodelInterfaces) {
if (!(CtReference.class.isAssignableFrom(t.getActualClass()))) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

why do we need this extra condition?

Copy link
Collaborator Author

@MartinWitt MartinWitt Jan 24, 2022

Choose a reason for hiding this comment

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

I copied the called method from here

public static Collection<Object[]> createReceiverList() {
and adapted it to create DynamicTests. The method createReceiverList is used in other test classes and therefore wasn't easy to change. Why createReceiverList has this check is not clear to me but it seems that is your code? #956

Copy link
Collaborator

Choose a reason for hiding this comment

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

ok thanks

@monperrus monperrus merged commit c8b5324 into INRIA:master Jan 25, 2022
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.

2 participants