Beispiel #1
0
        public void Setup()
        {
            var logger = new NullLogger <EngineConfigurationBuilder>();

            ecb = new EngineConfigurationBuilder(logger);

            host = new HostBuilder().ConfigureServices((context, services) =>
            {
                services.AddApplicationInsightsTelemetryWorkerService();
                services.AddSingleton <IDetectOnlineService, DetectOnlineService>();
                services.AddSingleton <IDetectVersionService, DetectVersionService>();
                services.AddSingleton <IEngineConfigurationBuilder, EngineConfigurationBuilderStub>();
                services.AddSingleton <EngineConfiguration>(ecb.CreateEmptyConfig());
                services.AddSingleton <ProcessorContainer>();
                services.AddSingleton <TypeDefinitionMapContainer>();
                services.AddSingleton <GitRepoMapContainer>();
                services.AddSingleton <FieldMapContainer>();

                services.AddSingleton <ChangeSetMappingContainer>();
                services.AddSingleton <ITelemetryLogger, TelemetryClientAdapter>();
                services.AddSingleton <ExecuteOptions>();
                services.AddSingleton <IMigrationEngine, MigrationEngine>();

                services.AddTransient <IMigrationClient, MigrationClientMock>();
                services.AddTransient <IWorkItemMigrationClient, WorkItemMigrationClientMock>();
                services.AddTransient <IWorkItemQueryBuilder, WorkItemQueryBuilder>();
            }).Build();
        }
 public EngineConfiguration CreateEmptyConfig()
 {
     return(ecb.CreateEmptyConfig());
 }