Esempio n. 1
0
        public async Task TestQueryRuns()
        {
            TriggerClient    triggerClient = CreateTriggerClient();
            TriggerRunClient runClient     = CreateRunClient();

            TriggerResource resource = await DisposableTrigger.CreateResource(triggerClient, Recording);

            TriggerStartTriggerOperation startOperation = await triggerClient.StartStartTriggerAsync(resource.Name);

            await startOperation.WaitAndAssertSuccessfulCompletion();

            TriggerRunsQueryResponse response = await runClient.QueryTriggerRunsByWorkspaceAsync(new RunFilterParameters (DateTimeOffset.MinValue, DateTimeOffset.MaxValue));

            Assert.GreaterOrEqual(response.Value.Count, 1);
        }
Esempio n. 2
0
        public async Task TestCancelRerun()
        {
            TriggerClient    triggerClient = CreateTriggerClient();
            TriggerRunClient runClient     = CreateRunClient();

            TriggerResource resource = await DisposableTrigger.CreateResource(triggerClient, Recording);

            TriggerStartTriggerOperation startOperation = await triggerClient.StartStartTriggerAsync(resource.Name);

            await startOperation.WaitAndAssertSuccessfulCompletion();

            TriggerRunsQueryResponse response = await runClient.QueryTriggerRunsByWorkspaceAsync(new RunFilterParameters (DateTimeOffset.MinValue, DateTimeOffset.MaxValue));

            // Find the active run and cancel (CancelTriggerInstanceAsync)

            // Rerun canceled run (RerunTriggerInstanceAsync)
        }