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

.NET Backend task (Guillermo Sáez) #639

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

Conversation

guillermosaez
Copy link

Exchange rate updater (.NET Backend test)

Start the project

  1. Clone the repository.
  2. Locate your terminal in the root directory of the solution. (/jobs/Backend/Task)
  3. Execute docker-compose up

Usage

This project can be tested in different ways, such as:

  • HTTP file: In ExchangeRateUpdater.Api/Controllers/ExchangeRates we can find the ExchangeRatesController.http file, that contains an example of the GetExchangeRates endpoint.
    It can be run in the IDE. In Rider, it can be run by clicking in the different green arrows found next to each endpoint.
  • Curl: Example curl -H 'Content-Type: application/json' -d '{"CurrencyCodes": ["EUR","USD"], "Date": "2024-08-25"}' -X POST http://localhost:5299/exchangerates
  • API clients, such as Postman.

Testing

For testing the project and building a code coverage report:

  1. Locate your terminal in the root directory of the solution. (/jobs/Backend/Task)
  2. Execute dotnet test --collect:"XPlat Code Coverage"
  3. Execute reportgenerator -reports:"**/*Tests/**/coverage.cobertura.xml" -targetdir:"coveragereport" -reporttypes:Html
  4. Go to /jobs/Backend/Task/coveragereport/ and open the Index.html file.

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