示例#1
0
				static void UpdateAndVerifyCustomerLink( SpIssueApi api, SpIssueApi.License license, SpCustomerApi.CustomerSummary customer )
				{
					var licenseCustomerAssignmentHref = license._links.customerAssignment.href;
					var apiResult = api.PutLicenseCustomerAssignment( licenseCustomerAssignmentHref, customer );
					Assert.Equal( HttpStatusCode.Accepted, apiResult.StatusCode );

					Verify.EventuallyWithBackOff( () =>
					{
						var updated = api.GetLicense( license._links.self.href );
						Assert.Equal( HttpStatusCode.OK, updated.StatusCode );
						Assert.NotNull( updated.Data._links.customer );
						var customerSelfLink = customer._links.self;
						Assert.Equal( customerSelfLink.href, updated.Data._links.customer.href, StringComparer.OrdinalIgnoreCase );
					} );
				}