-
-
Notifications
You must be signed in to change notification settings - Fork 351
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
refactor: simplify assertions in AnnotationTest.java #2426
refactor: simplify assertions in AnnotationTest.java #2426
Conversation
@@ -299,7 +299,7 @@ public void testAnnotatedElementTypes() { | |||
// check annotated element type of the package annotation | |||
List<CtAnnotation<?>> annotations = pkg.getAnnotations(); | |||
assertEquals(2, annotations.size()); | |||
assertTrue(annotations.get(0).getAnnotatedElement().equals(pkg)); | |||
assertEquals(annotations.get(0).getAnnotatedElement(), pkg); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the expected value should be first.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@monperrus
Thanks! I fixed this one.
Could you check other tests I modified?
@zielint0 All the AssertEquals of this PR (excluding the one you already fixed) needs to switch parameters: the expected value should be first. |
@pvojtechovsky |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you Tomasz
Use straightforward assertion - assertEquals for testing equality.
-->