Exemplo n.º 1
0
        public static void TestGetMembershipDetailsAsync()
        {
            using (var client = new CloudFlareClient(Credentials.Credentials.Authentication))
            {
                var userMembership = client.GetMembershipsAsync().Result;

                Assert.NotNull(userMembership);
                Assert.True(userMembership.Success);
                if (userMembership.Errors != null)
                {
                    Assert.Empty(userMembership.Errors);
                }

                var userMembershipDetails = client.GetMembershipDetailsAsync(userMembership.Result.First().Id).Result;

                Assert.NotNull(userMembershipDetails);
                Assert.True(userMembershipDetails.Success);
                if (userMembershipDetails.Errors != null)
                {
                    Assert.Empty(userMembershipDetails.Errors);
                }
            }
        }