Skip to content

Feat/add server tests #25

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

admEug
Copy link

@admEug admEug commented Aug 19, 2025

No description provided.

admEug and others added 2 commits August 19, 2025 15:28
… project.

Unit tests are added for the `PersonController`. Moq is used to mock the `IPersonRepository`.

Integration tests are added for the `PersonController` using `WebApplicationFactory`. The tests make requests to the API endpoints and verify the responses.

The following changes were made:
- Added `Blazorcrud.Server.Tests` project for unit tests.
- Added `Blazorcrud.Server.IntegrationTests` project for integration tests.
- Added unit tests for `PersonController`.
- Added integration tests for `PersonController`.
- Made the `Program` class public so that it can be accessed by the integration test project.
@admEug admEug closed this Aug 19, 2025
@admEug admEug reopened this Aug 19, 2025
@admEug
Copy link
Author

admEug commented Aug 19, 2025

ok

….IntegrationTests` projects to the `Blazorcrud.sln` solution file.

This was missed in the previous commit.
…over all the endpoints.

The following tests were added:
- GetPerson(id)
- AddPerson
- UpdatePerson
- DeletePerson

A helper class was added to get a JWT token for authenticated requests.
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.

1 participant