Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/masstransit/sample-webapplicationfactory
Sample API using RabbitMQ and Redis, but integration tests using in-memory
https://github.com/masstransit/sample-webapplicationfactory
Last synced: about 2 months ago
JSON representation
Sample API using RabbitMQ and Redis, but integration tests using in-memory
- Host: GitHub
- URL: https://github.com/masstransit/sample-webapplicationfactory
- Owner: MassTransit
- Created: 2022-05-04T21:56:26.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-10-12T15:57:27.000Z (about 2 years ago)
- Last Synced: 2024-03-25T23:29:28.161Z (9 months ago)
- Language: C#
- Size: 15.6 KB
- Stars: 16
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This sample shows how to use MassTransit's container-based test harness with the `WebApplicationFactory`, without requiring the application under test to know about the test harness.
The included `docker-compose.yml` can be used to start RabbitMQ and Redis so that the `Sample.Api` project can be run and interactively tested in the browser using the Swagger UI.
The `Sample.Tests` project uses `AddMassTransitTestHarness` to replace the RabbitMQ transport and Redis saga repository with the in-memory transport and in-memory saga repository, allowing the test to run without any backing services.
> This requires MassTransit 8.0.3, develop-444 or later.