Ejemplo n.º 1
0
        public async Task TestList()
        {
            IntegrationRuntimesClient      client       = CreateClient();
            IntegrationRuntimeListResponse integrations = await client.ListAsync();

            foreach (IntegrationRuntimeResource integration in integrations.Value)
            {
                Assert.NotNull(integration.Id);
                Assert.NotNull(integration.Name);
            }
        }
Ejemplo n.º 2
0
        public async Task TestGet()
        {
            IntegrationRuntimesClient      client       = CreateClient();
            IntegrationRuntimeListResponse integrations = await client.ListAsync();

            foreach (IntegrationRuntimeResource integration in integrations.Value)
            {
                IntegrationRuntimeResource fetchedIntegration = await client.GetAsync(integration.Name);

                Assert.AreEqual(integration.Name, fetchedIntegration.Name);
                Assert.AreEqual(integration.Id, fetchedIntegration.Id);
                Assert.AreEqual(integration.Type, fetchedIntegration.Type);
            }
        }
Ejemplo n.º 3
0
        public async Task <Response <IntegrationRuntimeListResponse> > ListAsync(CancellationToken cancellationToken = default)
        {
            using var message = CreateListRequest();
            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);

            switch (message.Response.Status)
            {
            case 200:
            {
                IntegrationRuntimeListResponse value = default;
                using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false);

                value = IntegrationRuntimeListResponse.DeserializeIntegrationRuntimeListResponse(document.RootElement);
                return(Response.FromValue(value, message.Response));
            }