Skip to content

Sample API using RabbitMQ and Redis, but integration tests using in-memory

Notifications You must be signed in to change notification settings

MassTransit/Sample-WebApplicationFactory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Sample API using RabbitMQ and Redis, but integration tests using in-memory

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages