use of org.forgerock.json.resource.PatchRequest in project OpenAM by OpenRock.
the class UmaPolicyResourceTest method shouldThrowNotSupportedExceptionForPatchInstance.
@Test
@SuppressWarnings("unchecked")
public void shouldThrowNotSupportedExceptionForPatchInstance() {
//Given
Context context = mock(Context.class);
PatchRequest request = Requests.newPatchRequest("/policies");
//When
Promise<ResourceResponse, ResourceException> result = policyResource.patchInstance(context, "RESOURCE_SET_UID", request);
//Then
assertThat(result).failedWithResourceException().isInstanceOf(NotSupportedException.class);
}
use of org.forgerock.json.resource.PatchRequest in project OpenAM by OpenRock.
the class ResourceSetResourceTest method patchShouldNotBeSupported.
@Test
public void patchShouldNotBeSupported() {
//Given
Context context = mock(Context.class);
PatchRequest request = mock(PatchRequest.class);
//When
Promise<ResourceResponse, ResourceException> promise = resource.patchInstance(context, "RESOURCE_SET_UID", request);
//Then
assertThat(promise).failedWithException().isInstanceOf(NotSupportedException.class);
}
Aggregations