Skip to content

Commit

Permalink
Add unit test to load ServiceProviderConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
Captain-P-Goldfish committed May 16, 2020
1 parent 55dfd2d commit 41fd43d
Showing 1 changed file with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import de.captaingoldfish.scim.sdk.common.constants.HttpHeader;
import de.captaingoldfish.scim.sdk.common.constants.HttpStatus;
import de.captaingoldfish.scim.sdk.common.constants.SchemaUris;
import de.captaingoldfish.scim.sdk.common.resources.ServiceProvider;
import de.captaingoldfish.scim.sdk.common.resources.User;
import de.captaingoldfish.scim.sdk.common.resources.complex.Meta;
import de.captaingoldfish.scim.sdk.common.resources.complex.Name;
Expand Down Expand Up @@ -242,4 +243,26 @@ public void testSendAdditionalHeaders()
.sendRequestWithMultiHeaders(httpHeaders);
Assertions.assertTrue(wasCalled.get());
}

/**
* verifies that a service provider configuration can successfully be read without any problems
*/
@Test
public void testGetServiceProviderAndReadDetails()
{
ServerResponse<ServiceProvider> response = scimRequestBuilder.get(ServiceProvider.class,
EndpointPaths.SERVICE_PROVIDER_CONFIG,
null)
.sendRequest();
Assertions.assertEquals(HttpStatus.OK, response.getHttpStatus());
ServiceProvider serviceProvider = response.getResource();
Assertions.assertNotNull(serviceProvider);
Assertions.assertDoesNotThrow(serviceProvider::getBulkConfig);
Assertions.assertDoesNotThrow(serviceProvider::getFilterConfig);
Assertions.assertDoesNotThrow(serviceProvider::getPatchConfig);
Assertions.assertDoesNotThrow(serviceProvider::getSortConfig);
Assertions.assertDoesNotThrow(serviceProvider::getETagConfig);
Assertions.assertDoesNotThrow(serviceProvider::getChangePasswordConfig);
Assertions.assertDoesNotThrow(serviceProvider::getAuthenticationSchemes);
}
}

0 comments on commit 41fd43d

Please sign in to comment.