Skip to content
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

CBA website development #33

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

CBA website development #33

wants to merge 9 commits into from

Conversation

CCL404
Copy link

@CCL404 CCL404 commented Nov 24, 2023

I created unit tests for the ASP.NET Core GoalController. Using xUnit and Moq libraries, I set up a test for the GetForUser method. I established mock implementations for IGoalsService and IUsersService, initialized sample Goal objects linked to a specific user, and configured the mock service to return these goals for the user ID. Upon executing the GetForUser method via the controller, I verified that the result wasn't null. I also ensured that each returned goal was an instance of Goal and contained the expected UserId, confirming the method's functionality. Adjustments were made according to the actual implementation for comprehensive testing.

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.

2 participants