public void TestInitialize() { if (!TestContext.TestName.Contains("TestHost")) { this.client = TestHelpers.CreateTaskHubClient(); this.taskHub = TestHelpers.CreateTaskHub(); this.fakeTaskHub = TestHelpers.CreateTaskHub(); this.taskHubNoCompression = TestHelpers.CreateTaskHubNoCompression(); this.taskHubLegacyCompression = TestHelpers.CreateTaskHubLegacyCompression(); this.taskHubAlwaysCompression = TestHelpers.CreateTaskHubAlwaysCompression(); this.clientNoCompression = TestHelpers.CreateTaskHubClientNoCompression(); this.taskHub.orchestrationService.CreateAsync(true).Wait(); } }
public async Task TestOrchestrationCount() { taskHub = TestHelpers.CreateTaskHub(); client = TestHelpers.CreateTaskHubClient(); var service = taskHub.orchestrationService as ServiceBusOrchestrationService; Assert.IsNotNull(service); await service.CreateAsync(); await client.CreateOrchestrationInstanceAsync("foo", "1.0", null); await client.CreateOrchestrationInstanceAsync("foo1", "1.0", null); await client.CreateOrchestrationInstanceAsync("foo2", "1.0", null); Assert.IsTrue(service.GetPendingOrchestrationsCount() == 3); await service.DeleteAsync(); }