private void CreateIntegrators() { IConfiguration configuration = configurationService.Load(); projectIntegrators = projectIntegratorListFactory.CreateProjectIntegrators(configuration.Projects); if (projectIntegrators.Count == 0) { Log.Info("No projects found"); } }
private void Initialize(IConfiguration configuration) { foreach (IProject project in configuration.Projects) { // Force the queue to be created if it does not exist already. IQueueConfiguration config = configuration.FindQueueConfiguration(project.QueueName); integrationQueues.Add(project.QueueName, config); } projectIntegrators = projectIntegratorListFactory.CreateProjectIntegrators(configuration.Projects, integrationQueues); if (projectIntegrators.Count == 0) { Log.Info("No projects found"); } }
public void CreateManagerGeneratesDefault() { IConfiguration configuration = mocks.DynamicMock <IConfiguration>(); IProjectList projectList = mocks.DynamicMock <IProjectList>(); IEnumerator enumerator = mocks.DynamicMock <IEnumerator>(); SetupResult.For(enumerator.MoveNext()).Return(false); SetupResult.For(projectList.GetEnumerator()).Return(enumerator); SetupResult.For(configuration.Projects).Return(projectList); IProjectIntegratorListFactory listFactory = mocks.DynamicMock <IProjectIntegratorListFactory>(); IProjectIntegratorList list = mocks.DynamicMock <IProjectIntegratorList>(); SetupResult.For(list.Count).Return(0); SetupResult.For(listFactory.CreateProjectIntegrators(null, null)).IgnoreArguments().Return(list); mocks.ReplayAll(); object instance = IntegrationQueueManagerFactory.CreateManager(listFactory, configuration, null); Assert.That(instance, Is.InstanceOf <IntegrationQueueManager>()); }