Search in sources :

Example 11 with UpdateServiceInstanceRequest

use of org.springframework.cloud.servicebroker.model.instance.UpdateServiceInstanceRequest in project spring-cloud-open-service-broker by spring-cloud.

the class ServiceInstanceControllerRequestTest method updateServiceInstanceWithInvalidServiceDefinitionIdThrowsException.

@Test
void updateServiceInstanceWithInvalidServiceDefinitionIdThrowsException() {
    UpdateServiceInstanceRequest updateRequest = UpdateServiceInstanceRequest.builder().serviceDefinitionId("unknown-service-definition-id").build();
    ServiceInstanceController controller = createControllerUnderTest();
    assertThrows(ServiceDefinitionDoesNotExistException.class, () -> controller.updateServiceInstance(pathVariables, null, false, null, null, null, updateRequest).block());
}
Also used : UpdateServiceInstanceRequest(org.springframework.cloud.servicebroker.model.instance.UpdateServiceInstanceRequest) Test(org.junit.jupiter.api.Test)

Aggregations

UpdateServiceInstanceRequest (org.springframework.cloud.servicebroker.model.instance.UpdateServiceInstanceRequest)11 Test (org.junit.jupiter.api.Test)8 AbstractServiceInstanceControllerIntegrationTest (org.springframework.cloud.servicebroker.autoconfigure.web.AbstractServiceInstanceControllerIntegrationTest)7 MvcResult (org.springframework.test.web.servlet.MvcResult)3 UpdateServiceInstanceResponse (org.springframework.cloud.servicebroker.model.instance.UpdateServiceInstanceResponse)2 Test (org.junit.Test)1 Theory (org.junit.experimental.theories.Theory)1