-
-
Notifications
You must be signed in to change notification settings - Fork 27.3k
Fix blocker issues on Sonar #508 #810
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
Conversation
| public void testName() throws Exception { | ||
| // given | ||
| String name = "Foobar"; | ||
| assertThat(simpleObject.getName()).isNull(); |
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.
We should use assertNull(simpleObject.getName()) here.
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.
What I feel is, it's good that AssertJ was used for assertions. It makes assertions readable, I was planning to either use Hamcrest or AssertJ in all modules. So I think we should keep assertion as is. And I will raise other issue to discuss assertion options.
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.
What I feel is, it's good that AssertJ was used for assertions. It makes assertions readable, I was planning to either use Hamcrest or AssertJ in all modules. So I think we should keep assertion as is. And I will raise other issue to discuss assertion options.
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.
What I feel is, it's good that AssertJ was used for assertions. It makes assertions readable, I was planning to either use Hamcrest or AssertJ in all modules. So I think we should keep assertion as is. And I will raise other issue to discuss assertion options.
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.
What I feel is, it's good that AssertJ was used for assertions. It makes assertions readable, I was planning to either use Hamcrest or AssertJ in all modules. So I think we should keep assertion as is. And I will raise other issue to discuss assertion options.
| simpleObject.setName(name); | ||
|
|
||
| // then | ||
| assertThat(simpleObject.getName()).isEqualTo(name); |
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.
Use assertEquals(name, simpleObject.getName()) here.
|
@staillebois we should use |
|
Ok I will do it today, thanks for the review. You just want I replace Assertj with JUnit that's right ? |
|
Done. |
IAmPramod
left a comment
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.
Looks good now.
|
@staillebois @IAmPramod I am confused. Were sonar blockers regarding the use of AssertJ? I personally feel that AssertJ and Hamcrest assertions read much better as compared to JUnit's. I was even planning to include them in all modules. @iluwatar Any thoughts on this? |
|
What I feel is, it's good that AssertJ was used for assertions. It makes assertions readable, I was planning to either use Hamcrest or AssertJ in all modules. So I think we should keep assertion as is. And I will raise other issue to discuss assertion options. |
|
Hi @npathai , I am agree with you AssertJ produce better logs. I replaced it only because of @IAmPramod 's comment and I was thinking that it was for remove the dependency with AssertJ. |
|
@staillebois It's all right now that we have already removed it. We can work on incorporating AssertJ or Hamcrest or Fest in all modules via other issue. Looks good 👍 |
|
@npathai good idea to improve the assertions in separate issue |
|
@staillebois Thanks for the contribution 👍 |
Fix blocker issues on sonar
Solves #508
naked-objects-dom
naked-objects-integtests