Пример #1
0
 public OrchestrationBackgroundService(
     OrchestrationConductor orchestrationConductor,
     ResourceStateStore resourceOrchestrator,
     IEnumerable <StartupService> startupServices
     )
 {
     _orchestrationConductor = orchestrationConductor;
     _resourceOrchestrator   = resourceOrchestrator;
 }
Пример #2
0
        public async Task Apply_Creates_Resource_In_Correct_Manager_When_No_Match_Exists()
        {
            var testClassManager     = new TestKinds.TestClassManager(new DoNothingResourceStore <TestKinds.TestClass>());
            var resourceOrchestrator = new ResourceStateStore(new[]
            {
                testClassManager
            }, new ResourceManagerContainer());

            var testObjOrigin = new TestKinds.TestClass {
                Id = Guid.NewGuid()
            };

            if (!testObjOrigin.Kind.TryConvertToDocument(testObjOrigin, out var resourceDocument))
            {
                Assert.Fail();
            }

            await resourceOrchestrator.Apply(resourceDocument);

            Assert.AreEqual(1, testClassManager.CreateCount);
        }
Пример #3
0
 public ControlService(ResourceStateStore resourceOrchestrator)
 {
     _resourceOrchestrator = resourceOrchestrator;
 }