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

Move junit4 to assertj #5685

Merged
merged 20 commits into from
Aug 16, 2022
Merged

Move junit4 to assertj #5685

merged 20 commits into from
Aug 16, 2022

Conversation

eddumelendez
Copy link
Member

No description provided.

Copy link
Member

@kiview kiview left a comment

Choose a reason for hiding this comment

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

Generally looks great. The only issue is the conversation of some assert description into the Assertj as(). I tried to eyeball them into something that makes more sense, but I was not super clear.

Here is the example from the docs:

// as() is used to describe the test and will be shown before the error message
assertThat(frodo.getAge()).as("check %s's age", frodo.getName()).isEqualTo(33);

So we should give them an additional look, with this background information.

I dedicate this PR review to @bsideup, whose effort in reviewing the last Assertj refactoring PR motivated me to go through this one file-by-file as well 😅

ffmpegOutput.contains("Duration: 00:") && !(ffmpegOutput.contains("Duration: 00:00:00.00"))
);
assertThat(ffmpegOutput.contains("Duration: 00:") && !(ffmpegOutput.contains("Duration: 00:00:00.00")))
.as("Duration is incorrect in:\n " + ffmpegOutput)
Copy link
Member

Choose a reason for hiding this comment

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

Not sure, should contain the expected duration?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think that would make the description more accurate

Copy link
Member

Choose a reason for hiding this comment

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

See my suggestion below. Feel free to accept, resolve this conversation and then merge 😇

eddumelendez and others added 8 commits August 15, 2022 11:21
…osedTest.java

Co-authored-by: Kevin Wittek <kiview@users.noreply.github.com>
…CassandraDriver4Test.java

Co-authored-by: Kevin Wittek <kiview@users.noreply.github.com>
…upiter/TestLifecycleAwareExceptionCapturingTest.java

Co-authored-by: Kevin Wittek <kiview@users.noreply.github.com>
…stoContainerTest.java

Co-authored-by: Kevin Wittek <kiview@users.noreply.github.com>
…stoContainerTest.java

Co-authored-by: Kevin Wittek <kiview@users.noreply.github.com>
…stoContainerTest.java

Co-authored-by: Kevin Wittek <kiview@users.noreply.github.com>
@@ -29,11 +29,7 @@
org.assertj.core.api.Assertions.*,
org.assertj.core.api.Assumptions.*,
org.awaitility.Awaitility.*,
org.hamcrest.Matchers.*,
org.hamcrest.MatcherAssert.*,
org.junit.Assert.*,
org.junit.Assume.*,
Copy link
Member

Choose a reason for hiding this comment

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

we should consider migrating this one to Assumptions too btw

Copy link
Member

@bsideup bsideup left a comment

Choose a reason for hiding this comment

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

💯 a few nits re automatically generated code, but excited to see these being replaced with AssertJ 🎉

eddumelendez and others added 2 commits August 15, 2022 19:55
…oContainerTest.java

Co-authored-by: Kevin Wittek <kiview@users.noreply.github.com>
eddumelendez and others added 6 commits August 15, 2022 22:29
…oContainerTest.java

Co-authored-by: Kevin Wittek <kiview@users.noreply.github.com>
…RecordingWebDriverContainerTest.java

Co-authored-by: Kevin Wittek <kiview@users.noreply.github.com>
…oContainerTest.java

Co-authored-by: Kevin Wittek <kiview@users.noreply.github.com>
…CassandraDriver3Test.java

Co-authored-by: Kevin Wittek <kiview@users.noreply.github.com>
ffmpegOutput.contains("Duration: 00:") && !(ffmpegOutput.contains("Duration: 00:00:00.00"))
);
assertThat(ffmpegOutput.contains("Duration: 00:") && !(ffmpegOutput.contains("Duration: 00:00:00.00")))
.as("Duration is incorrect in:\n " + ffmpegOutput)
Copy link
Member

Choose a reason for hiding this comment

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

See my suggestion below. Feel free to accept, resolve this conversation and then merge 😇

…RecordingWebDriverContainerTest.java

Co-authored-by: Kevin Wittek <kiview@users.noreply.github.com>
@eddumelendez eddumelendez merged commit 6a3e649 into master Aug 16, 2022
@delete-merged-branch delete-merged-branch bot deleted the assertj2 branch August 16, 2022 14:25
@kiview kiview removed the type/docs label Aug 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants