Open
Conversation
Contributor
There was a problem hiding this comment.
Copilot reviewed 3 out of 5 changed files in this pull request and generated no comments.
Files not reviewed (2)
- App-de-Vecinos.sln: Language not supported
- AppVecinos.API.Tests/AppVecinos.API.Tests.csproj: Language not supported
Comments suppressed due to low confidence (1)
AppVecinos.API.Tests/LoginTests.cs:31
- The properties 'username' and 'password' in 'LoginRequest' are inconsistently named. They should be renamed to 'Username' and 'Password' to match the naming convention in the other test method.
var response = await client.PostAsJsonAsync("/login", new LoginRequest { username = "Amin", password = "1234" });
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #74
This pull request adds a new test project for the
AppVecinos.APIand includes several related changes to the solution and project files. The most important changes include adding the new test project to the solution, configuring the test project with necessary packages, and implementing initial login tests.Additions to the solution:
App-de-Vecinos.sln: Added theAppVecinos.API.Testsproject to the solution file.App-de-Vecinos.sln: Updated theGlobalsection to include build configurations for the new test project.Configuration of the test project:
AppVecinos.API.Tests/AppVecinos.API.Tests.csproj: Created the project file forAppVecinos.API.Testswith references to necessary packages such ascoverlet.collector,Microsoft.AspNetCore.Mvc.Testing,Moq, andxunit.Implementation of login tests:
AppVecinos.API.Tests/LoginTests.cs: Implemented initial login tests to verify the API's behavior with valid and invalid credentials usingxunitandMoq.Minor changes:
AppVecinos.API/Program.cs: Wrapped the main execution logic in aProgramclass to support the test framework. [1] [2]