https://github.com/defra/cdms-gateway
Git repository for service cdms-gateway
https://github.com/defra/cdms-gateway
backend cdp dotnet service
Last synced: 8 months ago
JSON representation
Git repository for service cdms-gateway
- Host: GitHub
- URL: https://github.com/defra/cdms-gateway
- Owner: DEFRA
- Archived: true
- Created: 2024-10-23T16:13:34.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-03T10:23:13.000Z (over 1 year ago)
- Last Synced: 2025-02-09T03:45:03.762Z (over 1 year ago)
- Topics: backend, cdp, dotnet, service
- Language: C#
- Size: 161 KB
- Stars: 0
- Watchers: 7
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# cdms-gateway
Core delivery C# ASP.NET backend template.
* [Testing](#testing)
* [Running](#running)
* [Deploying](#deploying)
* [SonarCloud](#sonarCloud)
* [Dependabot](#dependabot)
### Testing
Run the tests with:
```
dotnet test
```
Unit tests execute without a running instance of the web server.
End-to-end tests can start the web server using `TestWebServer.BuildAndRun()` taking `ServiceDescriptors` to replace services with mocked or stubbed versions. The `TestWebServer` provides properties:
- `Services` allows access to injected services.
- `HttpServiceClient` provide a pre-configured `HttpClient` that can be used to access the web server.
- `OutboundTestHttpHandler` is a `TestHttpHandler` class that intercepts all `HttpClient` requests to dependant services called by the web server.
### Running
Run CDP-Deployments application:
```
dotnet run --project CdmsGateway --launch-profile Development
```
### Deploying
Before deploying via CDP set the correct config for the environment as per the `appsettings.Development.json`.
### SonarCloud
Example SonarCloud configuration are available in the GitHub Action workflows.
### Dependabot
We have added an example dependabot configuration file to the repository. You can enable it by renaming
the [.github/example.dependabot.yml](.github/example.dependabot.yml) to `.github/dependabot.yml`