Skip to content

Feat/add server tests - #25

Open
admEug wants to merge 4 commits into
thbst16:masterfrom
admEug:feat/add-server-tests
Open

Feat/add server tests#25
admEug wants to merge 4 commits into
thbst16:masterfrom
admEug:feat/add-server-tests

Conversation

@admEug

@admEug admEug commented Aug 19, 2025

Copy link
Copy Markdown

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

admEug commented Aug 19, 2025

Copy link
Copy Markdown
Author

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