Пример #1
0
			public FreshOrganizationFixture( SpAuthApi api, FreshCustomerFixture customer )
			{
				InviteStatusLink = customer.SignedCustomer._links.inviteStatus.href;
				var organization = new SpAuthApi.OrganizationCreateModel( customer.SignedCustomer );
				var response = api.CreateOrganization( organization );
				Assert.Equal( HttpStatusCode.Accepted, response.StatusCode );
			}
Пример #2
0
		public static void GetDeletedCustomerShould404( [Frozen] SpCustomerApi api, FreshCustomerFixture freshCustomerFixture )
		{
			var linkedAddress = freshCustomerFixture.SignedCustomer._links.self;
			var apiResult = api.DeleteCustomer( linkedAddress.href );
			Verify.EventuallyWithBackOff( () =>
				{
					apiResult = api.GetCustomer( linkedAddress.href );
					Assert.Equal( HttpStatusCode.NotFound, apiResult.StatusCode );
				} );
		}
Пример #3
0
		public static void UpdateDeletedCustomerShould410( [Frozen] SpCustomerApi api, string anonymousName, string anonymousExternalId, FreshCustomerFixture freshCustomerFixture )
		{
			var linkedAddress = freshCustomerFixture.SignedCustomer._links.self;
			var apiResult = api.DeleteCustomer( linkedAddress.href );

			var updatedCustomer = freshCustomerFixture.SignedCustomer;
			updatedCustomer.Name = anonymousName;
			updatedCustomer.ExternalId = anonymousExternalId;
			updatedCustomer._version++;
			apiResult = api.PutCustomer( linkedAddress.href, updatedCustomer );
			Assert.Equal( HttpStatusCode.Gone, apiResult.StatusCode );
		}
Пример #4
0
		public static void DeleteCustomerShouldYieldAccepted( [Frozen] SpCustomerApi api, FreshCustomerFixture freshCustomerFixture )
		{
			var linkedAddress = freshCustomerFixture.SignedCustomer._links.self;
			var apiResult = api.DeleteCustomer( linkedAddress.href );
			Assert.Equal( HttpStatusCode.Accepted, apiResult.StatusCode );
		}
Пример #5
0
		public static void ShouldYieldAccepted( [Frozen] SpAuthApi api, FreshCustomerFixture customer )
		{
			var organization = new SpAuthApi.OrganizationCreateModel( customer.SignedCustomer );
			var response = api.CreateOrganization( organization );
			Assert.Equal( HttpStatusCode.Accepted, response.StatusCode );
		}