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

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

origin: castlemock/castlemock

soapOperation.setOriginalEndpoint(address.getLocation());
soapOperation.setSoapVersion(address.getVersion());
soapOperation.setMockResponses(new ArrayList<SoapMockResponse>());
soapOperation.setDefaultBody(generateDefaultBody(operationResponseIdentifier));
soapOperation.setCurrentResponseSequenceIndex(DEFAULT_RESPONSE_SEQUENCE_INDEX);
origin: castlemock/castlemock

public static SoapProject generateFullSoapProject(){
  final SoapProject soapProject = new SoapProject();
  soapProject.setId("SOAP PROJECT");
  soapProject.setName("Project name");
  soapProject.setDescription("Project description");
  soapProject.setCreated(new Date());
  soapProject.setUpdated(new Date());
  soapProject.setPorts(new ArrayList<SoapPort>());
  for(int portIndex = 0; portIndex < 3; portIndex++){
    final SoapPort soapPort = SoapPortGenerator.generateSoapPort();
    soapPort.setOperations(new ArrayList<SoapOperation>());
    soapProject.getPorts().add(soapPort);
    for(int operationIndex = 0; operationIndex < 3; operationIndex++){
      final SoapOperation soapOperation = SoapOperationGenerator.generateSoapOperation();
      soapOperation.setMockResponses(new ArrayList<SoapMockResponse>());
      soapPort.getOperations().add(soapOperation);
      for(int responseIndex = 0; responseIndex < 3; responseIndex++){
        final SoapMockResponse soapMockResponse = SoapMockResponseGenerator.generateSoapMockResponse();
        soapOperation.getMockResponses().add(soapMockResponse);
      }
    }
  }
  return soapProject;
}
origin: castlemock/castlemock

  public static SoapOperation generateSoapOperation(){
    final SoapOperation soapOperation = new SoapOperation();
    soapOperation.setId("SOAP OPERATION");
    soapOperation.setName("Soap operation name");
    soapOperation.setCurrentResponseSequenceIndex(1);
    soapOperation.setDefaultBody("Default body");
    soapOperation.setForwardedEndpoint("Forwarded event");
    soapOperation.setInvokeAddress("Invoke address");
    soapOperation.setOriginalEndpoint("Original endpoint");
    soapOperation.setHttpMethod(HttpMethod.POST);
    soapOperation.setStatus(SoapOperationStatus.MOCKED);
    soapOperation.setSoapVersion(SoapVersion.SOAP11);
    soapOperation.setIdentifyStrategy(SoapOperationIdentifyStrategy.ELEMENT_NAMESPACE);
    soapOperation.setMockResponses(new ArrayList<SoapMockResponse>());
    return soapOperation;
  }
}
origin: castlemock/castlemock

final SoapOperation soapOperation = this.operationRepository.findOne(input.getOperationId());
final List<SoapMockResponse> mockResponses = this.mockResponseRepository.findWithOperationId(input.getOperationId());
soapOperation.setMockResponses(mockResponses);
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<IdentifySoapOperationOutput> process(final ServiceTask<IdentifySoapOperationInput> serviceTask) {
  final IdentifySoapOperationInput input = serviceTask.getInput();
  final SoapPort port = this.portRepository.findWithUri(input.getProjectId(), input.getUri());
  final SoapOperation operation =
      this.operationRepository.findWithMethodAndVersionAndIdentifier(
          port.getId(), input.getHttpMethod(),
          input.getType(), input.getOperationIdentifier());
  if(operation == null){
    throw new IllegalArgumentException("Unable to identify SOAP operation: " + input.getUri());
  }
  final List<SoapMockResponse> mockResponses = this.mockResponseRepository.findWithOperationId(operation.getId());
  operation.setMockResponses(mockResponses);
  return createServiceResult(IdentifySoapOperationOutput.builder()
      .projectId(input.getProjectId())
      .portId(port.getId())
      .operationId(operation.getId())
      .operation(operation)
      .build());
}
origin: castlemock/castlemock

soapOperation.setSimulateNetworkDelay(false);
soapOperation.setStatus(SoapOperationStatus.MOCKED);
soapOperation.setMockResponses(Arrays.asList(soapMockResponse));
com.castlemock.core.mock.soap.model.project.domainSoapOperationsetMockResponses

Popular methods of SoapOperation

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

Popular in Java

  • Reactive rest calls using spring rest template
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getSystemService (Context)
  • addToBackStack (FragmentTransaction)
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • JButton (javax.swing)
  • JOptionPane (javax.swing)
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • 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