Skip to content

Task/6-User feature set up#24

Merged
benjaminnNgo merged 8 commits intodevfrom
task/6-UserFeatureSetUp
Jan 22, 2026
Merged

Task/6-User feature set up#24
benjaminnNgo merged 8 commits intodevfrom
task/6-UserFeatureSetUp

Conversation

@benjaminnNgo
Copy link
Copy Markdown
Contributor

@benjaminnNgo benjaminnNgo commented Jan 21, 2026

Summary / Description

This PR covered:

  • Set up the UserController and created a REST API as a proof of concept
  • Created UserService
  • Updated UserModel to complete version (up to the need for feature 1)
  • Added codecov CI: this is an optional CI, but it is necessary to look at since we need to ensure code coverage of 100% as a requirement. In the future PR, codecov will comment on each PR and showing code coverage, something like this

Related Issues: #16

Type of Change

  • Bug fix
  • New feature
  • Breaking Change
  • Refactoring
  • Documentation update

Test Evidence

Describe how this PR has been tested.

  • Unit tests
  • Integration tests

Questions / Discussion Points

List any areas where you’d like reviewer input or have open questions.

@benjaminnNgo benjaminnNgo marked this pull request as draft January 21, 2026 04:58
@benjaminnNgo benjaminnNgo self-assigned this Jan 21, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Jan 22, 2026

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 ☂️

@benjaminnNgo benjaminnNgo modified the milestones: Sprint 1, Sprint 2 Jan 22, 2026
@benjaminnNgo benjaminnNgo linked an issue Jan 22, 2026 that may be closed by this pull request
@benjaminnNgo benjaminnNgo marked this pull request as ready for review January 22, 2026 01:44
@benjaminnNgo benjaminnNgo changed the title Task/6 user feature set up Task/6- User feature set up Jan 22, 2026
@benjaminnNgo benjaminnNgo changed the title Task/6- User feature set up Task/6-User feature set up Jan 22, 2026
Copy link
Copy Markdown
Collaborator

@gloox gloox left a comment

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

getMethods_shouldReturnInitializedValues, setFirstNameAndLastName_shouldUpdateNamesIndependently, constructor_emailAndPasswordOnly_shouldInitializeLoginUserFields, constructor_allFieldsExceptId_shouldInitializeWithoutId

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

These are alternative names that follow the test naming convention. I know it's annoying but it is standard for a reason.

Copy link
Copy Markdown
Collaborator

@gloox gloox Jan 22, 2026

Choose a reason for hiding this comment

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

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.

@benjaminnNgo benjaminnNgo merged commit aa60132 into dev Jan 22, 2026
7 checks passed
@benjaminnNgo benjaminnNgo deleted the task/6-UserFeatureSetUp branch February 6, 2026 01:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature 1: Set up UserController for REST API, UserService, UserDTO

2 participants