Savorboard 5 лет назад
Родитель
Сommit
7580ae66b2
1 измененных файлов: 6 добавлений и 4 удалений
  1. +6
    -4
      test/DotNetCore.CAP.Test/ConsumerServiceSelectorTest.cs

+ 6
- 4
test/DotNetCore.CAP.Test/ConsumerServiceSelectorTest.cs Просмотреть файл

@@ -8,16 +8,18 @@ namespace DotNetCore.CAP.Test
{
public class ConsumerServiceSelectorTest
{
private IServiceProvider _provider;
private readonly IServiceProvider _provider;

public ConsumerServiceSelectorTest()
{
var services = new ServiceCollection();
//services.AddSingleton<IConsumerServiceSelector, DefaultConsumerServiceSelector>();
var services = new ServiceCollection();
ServiceCollectionExtensions.ServiceCollection = services;
services.AddOptions();
services.PostConfigure<CapOptions>(x=>{});
services.AddSingleton<IConsumerServiceSelector, DefaultConsumerServiceSelector>();
services.AddScoped<IFooTest, CandidatesFooTest>();
services.AddScoped<IBarTest, CandidatesBarTest>();
services.AddLogging();
services.AddCap(x => { });
_provider = services.BuildServiceProvider();
}



Загрузка…
Отмена
Сохранить