示例#1
0
        public async Task TestGetZoneDetailsAsync()
        {
            using var client = new CloudFlareClient(Credentials.Credentials.Authentication);
            var zonesQueryResult       = (await client.GetZonesAsync()).Result.First();
            var zoneDetailsQueryResult = await client.GetZoneDetailsAsync(zonesQueryResult.Id);

            Assert.NotNull(zoneDetailsQueryResult);
            Assert.Empty(zoneDetailsQueryResult.Errors);
            Assert.True(zoneDetailsQueryResult.Success);
        }
        public void TestGetZoneDetailsAsync()
        {
            using (var client = new CloudFlareClient(Credentials.Credentials.Authentication))
            {
                var zonesQueryResult       = client.GetZonesAsync().Result.Result.First();
                var zoneDetailsQueryResult = client.GetZoneDetailsAsync(zonesQueryResult.Id).Result;

                Assert.NotNull(zoneDetailsQueryResult);
                Assert.Empty(zoneDetailsQueryResult.Errors);
                Assert.True(zoneDetailsQueryResult.Success);
            }
        }