Tabnine Logo
SoapOperation.setDefaultResponseName
Code IndexAdd Tabnine to your IDE (free)

How to use
setDefaultResponseName
method
in
com.castlemock.core.mock.soap.model.project.domain.SoapOperation

Best Java code snippets using com.castlemock.core.mock.soap.model.project.domain.SoapOperation.setDefaultResponseName (Showing top 2 results out of 315)

origin: castlemock/castlemock

for(SoapMockResponse mockResponse : mockResponses){
  if(mockResponse.getId().equals(soapOperation.getDefaultMockResponseId())){
    soapOperation.setDefaultResponseName(mockResponse.getName());
    defaultXpathMockResponseFound = true;
    break;
origin: castlemock/castlemock

@Test
public void testMockedXpathDefaultResponse(){
  // Input
  final HttpServletRequest httpServletRequest = getMockedHttpServletRequest(REQUEST_BODY);
  final HttpServletResponse httpServletResponse = getHttpServletResponse();
  final SoapOperation soapOperation = getSoapOperation();
  soapOperation.setDefaultResponseName("Mocked response");
  soapOperation.setDefaultMockResponseId("MockResponseId");
  soapOperation.setResponseStrategy(SoapResponseStrategy.XPATH_INPUT);
  final IdentifySoapOperationOutput identifySoapOperationOutput = IdentifySoapOperationOutput.builder()
      .projectId(PROJECT_ID)
      .portId(SOAP_PORT_ID)
      .operationId(SOAP_OPERATION_ID)
      .operation(soapOperation)
      .build();
  when(serviceProcessor.process(any(IdentifySoapOperationInput.class))).thenReturn(identifySoapOperationOutput);
  when(httpServletRequest.getRequestURI()).thenReturn(CONTEXT + SLASH + MOCK + SLASH + SOAP + SLASH + PROJECT +
      SLASH + PROJECT_ID + SLASH + SOAP_PORT_ID);
  final ResponseEntity responseEntity = soapServiceController.postMethod(PROJECT_ID, httpServletRequest, httpServletResponse);
  Assert.assertEquals(RESPONSE_BODY, responseEntity.getBody());
  Assert.assertEquals(HttpStatus.OK, responseEntity.getStatusCode());
  Assert.assertEquals(true, responseEntity.getHeaders().containsKey(CONTENT_TYPE_HEADER));
  Assert.assertEquals(true, responseEntity.getHeaders().containsKey(ACCEPT_HEADER));
  Assert.assertEquals(APPLICATION_XML, responseEntity.getHeaders().get(CONTENT_TYPE_HEADER).get(0));
  Assert.assertEquals(APPLICATION_XML, responseEntity.getHeaders().get(ACCEPT_HEADER).get(0));
}
com.castlemock.core.mock.soap.model.project.domainSoapOperationsetDefaultResponseName

Popular methods of SoapOperation

  • <init>
  • setHttpMethod
  • setName
  • getMockResponses
  • setCurrentResponseSequenceIndex
  • setForwardedEndpoint
  • setSoapVersion
  • setStatus
  • getId
  • getName
  • setDefaultBody
  • setId
  • setDefaultBody,
  • setId,
  • setIdentifyStrategy,
  • setInvokeAddress,
  • setMockResponses,
  • setNetworkDelay,
  • setOriginalEndpoint,
  • setPortId,
  • setResponseStrategy,
  • setSimulateNetworkDelay

Popular in Java

  • Making http requests using okhttp
  • putExtra (Intent)
  • startActivity (Activity)
  • addToBackStack (FragmentTransaction)
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now