-
- void getMockServerClientCreateInfoType(String infoType, boolean isSuccess) {
- if (isSuccess) {
- mockServer.expect(ExpectedCount.once(), requestTo(String.format(URI_INFO_TYPE, infoType)))
- .andExpect(method(HttpMethod.PUT)).andRespond(withStatus(HttpStatus.CREATED));
- } else {
- mockServer.expect(ExpectedCount.once(), requestTo(String.format(URI_INFO_TYPE, infoType)))
- .andExpect(method(HttpMethod.PUT)).andRespond(withStatus(HttpStatus.BAD_GATEWAY));
- }
- }
-
- void getMockServerClientCreateInfoProducer(String infoProducer, boolean isSuccess) {
- if (isSuccess) {
- mockServer.expect(ExpectedCount.once(), requestTo(String.format(URI_INFO_PRODUCER, infoProducer)))
- .andExpect(method(HttpMethod.PUT)).andRespond(withStatus(HttpStatus.CREATED));
- } else {
- mockServer.expect(ExpectedCount.once(), requestTo(String.format(URI_INFO_PRODUCER, infoProducer)))
- .andExpect(method(HttpMethod.PUT)).andRespond(withStatus(HttpStatus.BAD_GATEWAY));
- }
- }
-
- void getMockServerClientCreateInfoConsumer(String infoConsumer, boolean isSuccess) {
- if (isSuccess) {
- mockServer.expect(ExpectedCount.once(), requestTo(String.format(URI_INFO_CONSUMER, infoConsumer)))
- .andExpect(method(HttpMethod.PUT)).andRespond(withStatus(HttpStatus.CREATED));
- } else {
- mockServer.expect(ExpectedCount.once(), requestTo(String.format(URI_INFO_CONSUMER, infoConsumer)))
- .andExpect(method(HttpMethod.PUT)).andRespond(withStatus(HttpStatus.BAD_GATEWAY));
- }
- }
-
- void getMockServerClientDeleteInfoProducer(String infoProducer, boolean isSuccess) {
- if (isSuccess) {
- mockServer.expect(ExpectedCount.once(), requestTo(String.format(URI_INFO_PRODUCER, infoProducer)))
- .andExpect(method(HttpMethod.DELETE)).andRespond(withStatus(HttpStatus.NO_CONTENT));
- } else {
- mockServer.expect(ExpectedCount.once(), requestTo(String.format(URI_INFO_PRODUCER, infoProducer)))
- .andExpect(method(HttpMethod.DELETE)).andRespond(withStatus(HttpStatus.BAD_GATEWAY));
- }
- }
-
- void getMockServerClientDeleteInfoConsumer(String infoConsumer, boolean isSuccess) {
- if (isSuccess) {
- mockServer.expect(ExpectedCount.once(), requestTo(String.format(URI_INFO_CONSUMER, infoConsumer)))
- .andExpect(method(HttpMethod.DELETE)).andRespond(withStatus(HttpStatus.NO_CONTENT));
- } else {
- mockServer.expect(ExpectedCount.once(), requestTo(String.format(URI_INFO_CONSUMER, infoConsumer)))
- .andExpect(method(HttpMethod.DELETE)).andRespond(withStatus(HttpStatus.BAD_GATEWAY));
- }
- }
-