Skip to content
This repository has been archived by the owner on Dec 16, 2021. It is now read-only.

nhs-digital-gp-it-futures/BuyingCatalogueDocumentService

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BuyingCatalogueDocumentService - Service architecture for the NHS Digital Buying Catalogue Document Service .Net Core application

IMPORTANT NOTES

You can use either the latest version of Visual Studio or .NET CLI for Windows, Mac and Linux.

Architecture overview

This application uses .NET 5 to provide an API capable of running on Linux or Windows. It interfaces with Azure Blob Storage, via the .Net Azure Storage SDK.

Overview of the application code

This repo consists of one service using .NET 5 and Docker.

List of all endpoints the application exposes can be found here

The application is broken down into the following project libraries:

  • API
    • Defines and exposes the available Buying Catalogue Document Service endpoints
  • API.UnitTests
    • Contains all unit tests for the API project
  • API.IntegrationTests
    • Contains all integration tests for the API project

Setting up your development environment for the Buying Catalogue Document Service

Requirements

  • .NET 5.0
  • Docker

Before you begin please install .NET 5.0 & Docker on your machine.

Running the API

Running

To start up the API, run the following command from the root directory of the repository.

docker-compose -f "docker-compose.integration.yml" up -d

This will start the API in a docker container, as well as Azure Storage, emulated within another container.

You can verify that the API has launched correctly by navigating to the following urls via any web browser.

If both URLs return 'Healthy', the environment is configured correctly, and can be accessed via the public endpoints.

If the ready URL returns 'Degraded', the Azure Storage container has failed to launch, or cannot be accessed.

Stopping

To stop the API, run the following command from the root directory of the repository.

docker-compose -f "docker-compose.integration.yml" down -v

This will stop both the API docker container and the Azure Storage docker container.

Running the Integration Tests

Before running the integration tests for the solution, the API must be started using the command given above.

These tests are written using SpecFlow, and can be run using any Unit Test runner capable of running NUnit tests.