Ejemplo n.º 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 );
			}
Ejemplo n.º 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 );
				} );
		}
Ejemplo n.º 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 );
		}
Ejemplo n.º 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 );
		}
Ejemplo n.º 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 );
		}