Skip to content

Improved unit tests in dao module and added log4j dependency. #241

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

Closed
wants to merge 4 commits into from

Conversation

themoffster
Copy link

No description provided.

Alan added 2 commits September 5, 2015 21:54
System.out.println() statements.
Added unit tests for doa module.
final Customer customer1 = new Customer(1, "Adam", "Adamson");
final Customer customer2 = new Customer(2, "Bob", "Bobson");
final Customer customer3 = new Customer(3, "Carl", "Carlson");
final List<Customer> customers = new ArrayList<Customer>();
Copy link
Contributor

Choose a reason for hiding this comment

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

Nitpick: Verbosity can be reduced here by using <>.

@npathai
Copy link
Contributor

npathai commented Sep 14, 2015

Ping @themoffster

@themoffster
Copy link
Author

Feel free to reject the changes, it makes no difference to me.
The arguments I would make though is that there is absolutely no unit test coverage currently - if you have better alternatives feel free to use them instead.

The caveat to that is the .equals() and .hash() methods which I agree are incorrect and those changes should be rejected.

Testing getters and setters is valid IMO. I see the argument of not wanting them in classes with a lot of class variables but this is not the case here.

Finally, fields should be declared as final as that is best practice as you can see in reports from Sonarqube - with this project being a sample reference for other users, these best practices should be incorporated.

Cheers

On 14 Sep 2015, at 08:40, Narendra Pathai [email protected] wrote:

Ping @themoffster


Reply to this email directly or view it on GitHub.

@npathai
Copy link
Contributor

npathai commented Sep 14, 2015

@themoffster We are not rejecting your changes, we want you to update them. We appreciate that you are putting effort in contributing better tests. As far as testing getter and setter goes, it comes to personal taste. All the other points made are valid IMO and we await your responses on them, so that we can improve further. Even we want to be better FYI #224 .

Alan added 2 commits September 14, 2015 21:22
Formatted code using this formatter:
https://github.com/google/styleguide/blob/gh-pages/eclipse-java-google-style.xml
Removed argument final declaration on interface
Updated addCustomer logic for cases where the added customer already
exists
@themoffster
Copy link
Author

closing this pull request to make changes based on feedback

pratigya0 pushed a commit to pratigya0/java-design-patterns that referenced this pull request Aug 3, 2023
* add solution

* Update question language

* Update question language

* Print "No difference" if no difference between dirs

Co-authored-by: Luke LeVasseur <[email protected]>
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.

3 participants