Squadron

Squadron

  • Docs
  • Blog
  • GitHub

›Introduction

Introduction

  • Introduction
  • Quickstart
  • Basic Concept
  • Container Options
  • Configuration
  • Multiple resources

Container Providers

  • MongoDB
  • MongoDB Replica Set
  • SQL Server
  • Elasticsearch
  • PostgreSQL
  • Redis
  • RabbitMQ
  • Azure Storage
  • Generic
  • Compose

Azure Cloud Providers

  • Setup
  • ServiceBus
Edit

Multiple resources

Sometimes your tests will depend on more than one resource, then you have the following options:

  1. Inject multiple Fixtures into you test class
public class UserRespositoryTests :
    IClassFixture<MongoResource>,
    IClassFicture<AzureStorageBlobResource>
{
    private readonly MongoResourceResource _mongoResource;
    private readonly AzureStorageBlobResource _azureBlobResource;

    public UserRespositoryTests(
        MongoResource mongoResource,
        AzureStorageBlobResource azureBlobResource)
    {
        _mongoResource = mongoResource;
        _azureBlobResource = azureBlobResource
    }
}
  1. Use a compose resource

Using a compose resources is required in case you have dependencies between your resources.

Compose resource is only available for container based resources at the moment.

Last updated on 11/11/2019 by Florian Rohrer
← ConfigurationMongoDB →

Community

Contributor License AgreementsCode of Conduct
Swiss Life OSSSwiss Life | OSS
Copyright © 2021 Swiss Life Developers