Multiple resources
Sometimes your tests will depend on more than one resource, then you have the following options:
- 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
}
}
- 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.