Conversation
…n Added Dummy endpoint for UserController. Formated code with gg Java style
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment Thanks for integrating Codecov - We've got you covered ☂️ |
There was a problem hiding this comment.
I think the actual code is pretty good for a start. Looking at the tests though does make me wonder if we should create a convention for them. Particularly for naming them. It seems like the tests are mostly testing the happy paths, but for more exceptional paths, we could do names like "givenNullInput_whenCreateUser_returnError" so they're very small and easy to understand just by the name. I don't know how useful that naming scheme is for the happy paths though. For reference, I was mainly looking at 3.3 to 3.5 I think would be good to reference for our testing rules: https://www.baeldung.com/java-unit-testing-best-practices. @ACM02 @EricHodgson @lacernakate I can't @ niko for some reason. But I am curious what yall think.
There was a problem hiding this comment.
getMethods_shouldReturnInitializedValues, setFirstNameAndLastName_shouldUpdateNamesIndependently, constructor_emailAndPasswordOnly_shouldInitializeLoginUserFields, constructor_allFieldsExceptId_shouldInitializeWithoutId
There was a problem hiding this comment.
These are alternative names that follow the test naming convention. I know it's annoying but it is standard for a reason.
There was a problem hiding this comment.
Also, if you look at the testing standards link that I sent. Using just Java assert is not reccomend. Use Assert.assertEquals instead of Java assert. This is because Java asserts can be disabled whereas the Junit versions always run in tests.
Summary / Description
This PR covered:
Related Issues: #16
Type of Change
Test Evidence
Describe how this PR has been tested.
Questions / Discussion Points
List any areas where you’d like reviewer input or have open questions.