This repository has been archived on 2022-11-03. You can view files and clone it, but cannot push or open issues or pull requests.
DevOpsOpenHack/apis/poi/README.md
2022-11-03 16:41:13 -04:00

2.3 KiB

POI Service

Overview

POI (Trip Points of Interest) - CRUD API written in .NET Core 3.1 for Points of Interest on trips. Hello there.

Build & Test

Restore dependencies

dotnet restore

NOTE: Starting with .NET Core 2.0 SDK, you don't have to run dotnet restore because it's run implicitly by all commands that require a restore to occur, such as dotnet new, dotnet build and dotnet run. It's still a valid command in certain scenarios where doing an explicit restore makes sense, such as continuous integration builds in Azure DevOps Services or in build systems that need to explicitly control the time at which the restore occurs.

Build the Application

dotnet build

Testing

You can run the test in Visual Studio/VSCode or with the command line.

To use the command line just type:

dotnet test --logger "trx;LogFileName=TestResults.trx" --results-directory ./TestResults

This will run both the Unit Tests and the Integration Tests.

Unit Tests

To run only the Unit Tests use filters:

dotnet test --filter "FullyQualifiedName~UnitTest" --logger "trx;LogFileName=UnitTestResults.trx" --results-directory ./TestResults

Integration Tests

To run only the Integration Tests use filters:

dotnet test --filter "FullyQualifiedName~IntegrationTests" --logger "trx;LogFileName=IntegrationTestResults.trx" --results-directory ./TestResults

NOTE: Integration Tests require the Database to be available

References