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

How to use
getResponseStrategy
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.getResponseStrategy (Showing top 4 results out of 315)

origin: castlemock/castlemock

if(mockResponses.isEmpty()){
  throw new SoapException("No mocked response created for operation " + soapOperation.getName());
} else if(soapOperation.getResponseStrategy().equals(SoapResponseStrategy.RANDOM)){
  final Integer responseIndex = RANDOM.nextInt(mockResponses.size());
  mockResponse = mockResponses.get(responseIndex);
} else if(soapOperation.getResponseStrategy().equals(SoapResponseStrategy.SEQUENCE)){
  Integer currentSequenceNumber = soapOperation.getCurrentResponseSequenceIndex();
  if(currentSequenceNumber >= mockResponses.size()){
      .currentResponseSequenceIndex(currentSequenceNumber + 1)
      .build());
} else if (soapOperation.getResponseStrategy().equals(SoapResponseStrategy.XPATH_INPUT)) {
  for (SoapMockResponse testedMockResponse : mockResponses) {
    for(SoapXPathExpression xPathExpression : testedMockResponse.getXpathExpressions()){
origin: castlemock/castlemock

Assert.assertEquals(operation.getStatus(), returnedSoapOperation.getStatus());
Assert.assertEquals(operation.getForwardedEndpoint(), returnedSoapOperation.getForwardedEndpoint());
Assert.assertEquals(operation.getResponseStrategy(), returnedSoapOperation.getResponseStrategy());
Assert.assertEquals(operation.getSimulateNetworkDelay(), returnedSoapOperation.getSimulateNetworkDelay());
Assert.assertEquals(operation.getNetworkDelay(), returnedSoapOperation.getNetworkDelay());
origin: castlemock/castlemock

private void verify(final SoapPort soapPort,
          final String name,
          final SoapVersion soapVersion){
  Assert.assertEquals(name + ".Endpoint", soapPort.getName());
  Assert.assertEquals(name + ".Endpoint", soapPort.getUri());
  Assert.assertEquals(1, soapPort.getOperations().size());
  SoapOperation soapOperation = soapPort.getOperations().get(0);
  Assert.assertEquals(name, soapOperation.getName());
  Assert.assertEquals(SoapResponseStrategy.RANDOM, soapOperation.getResponseStrategy());
  Assert.assertEquals(SoapOperationStatus.MOCKED, soapOperation.getStatus());
  Assert.assertEquals(soapVersion, soapOperation.getSoapVersion());
  Assert.assertEquals(HttpMethod.POST, soapOperation.getHttpMethod());
  SoapOperationIdentifier operationIdentifier = soapOperation.getOperationIdentifier();
  Assert.assertNotNull(operationIdentifier);
  Assert.assertEquals("Request", operationIdentifier.getName());
  Assert.assertEquals("http://Services/ServiceExample/ServiceExample/1/Schema",
      operationIdentifier.getNamespace());
}
origin: castlemock/castlemock

  /**
   * The process message is responsible for processing an incoming serviceTask and generate
   * a response based on the incoming serviceTask input
   * @param serviceTask The serviceTask that will be processed by the service
   * @return A result based on the processed incoming serviceTask
   * @see ServiceTask
   * @see ServiceResult
   */
  @Override
  public ServiceResult<UpdateSoapOperationOutput> process(final ServiceTask<UpdateSoapOperationInput> serviceTask) {
    final UpdateSoapOperationInput input = serviceTask.getInput();
    final SoapOperation updated = input.getOperation();
    final SoapOperation soapOperation = this.operationRepository.findOne(input.getOperationId());

    soapOperation.setStatus(updated.getStatus());
    soapOperation.setForwardedEndpoint(updated.getForwardedEndpoint());
    soapOperation.setResponseStrategy(updated.getResponseStrategy());
    soapOperation.setSimulateNetworkDelay(updated.getSimulateNetworkDelay());
    soapOperation.setNetworkDelay(updated.getNetworkDelay());
    soapOperation.setDefaultMockResponseId(updated.getDefaultMockResponseId());
    soapOperation.setMockOnFailure(updated.getMockOnFailure());
    soapOperation.setIdentifyStrategy(updated.getIdentifyStrategy());

    final SoapOperation updatedSoapOperation = this.operationRepository.update(input.getOperationId(), soapOperation);
    return createServiceResult(UpdateSoapOperationOutput.builder()
        .operation(updatedSoapOperation)
        .build());
  }
}
com.castlemock.core.mock.soap.model.project.domainSoapOperationgetResponseStrategy

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

  • Reactive rest calls using spring rest template
  • notifyDataSetChanged (ArrayAdapter)
  • requestLocationUpdates (LocationManager)
  • scheduleAtFixedRate (Timer)
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Join (org.hibernate.mapping)
  • Top plugins for WebStorm
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