예제 #1
0
        public async Task VerifyOrchestrationStateQueryEntitiesTest()
        {
            var expectedOrchestrationState = Utils.InfiniteOrchestrationTestData().First();

            //additional data to ensure query doesn't return back more data than it should
            var extraOrchestrationState = Utils.InfiniteOrchestrationTestData().First();


            await InstanceStore.WriteEntitiesAsync(new InstanceEntityBase[] { expectedOrchestrationState, extraOrchestrationState });

            var actual = (await InstanceStore.GetEntitiesAsync(expectedOrchestrationState.State.OrchestrationInstance.InstanceId, expectedOrchestrationState.State.OrchestrationInstance.ExecutionId)).ToList();

            Assert.AreEqual(1, actual.Count);

            var actualOrchestration = actual.First();

            Assert.AreEqual(expectedOrchestrationState.State.OrchestrationInstance.InstanceId, actualOrchestration.State.OrchestrationInstance.InstanceId);
            Assert.AreEqual(expectedOrchestrationState.State.OrchestrationInstance.ExecutionId, actualOrchestration.State.OrchestrationInstance.ExecutionId);
        }