Пример #1
0
        public void TestDeletePartner()
        {
            string partnerId = "123457";

            HttpMockServer.RecordsDirectory = GetSessionsDirectoryPath();
            using (MockContext context = MockContext.Start(this.GetType().FullName))
            {
                var managementPartnerClient = ManagementPartnerTestUtilities.GetACEProvisioningManagementPartnerAPIClient(context, new RecordedDelegatingHandler {
                    StatusCodeToReturn = HttpStatusCode.OK
                });
                managementPartnerClient.Partner.DeleteAsync(partnerId).Wait();
            }
        }
Пример #2
0
        public void TestCreatePartner()
        {
            string partnerId = "123456";

            HttpMockServer.RecordsDirectory = GetSessionsDirectoryPath();
            using (MockContext context = MockContext.Start(this.GetType().FullName))
            {
                var managementPartnerClient = ManagementPartnerTestUtilities.GetACEProvisioningManagementPartnerAPIClient(context, new RecordedDelegatingHandler {
                    StatusCodeToReturn = HttpStatusCode.OK
                });
                var partner = managementPartnerClient.Partner.CreateAsync(partnerId).Result;
                ValidatePartner(partner);
                Assert.NotNull(partner.PartnerId);
            }
        }