congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
SoapOperation.setStatus
Code IndexAdd Tabnine to your IDE (free)

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

origin: castlemock/castlemock

soapOperation.setName(bindingOperation.getName());
soapOperation.setHttpMethod(HttpMethod.POST);
soapOperation.setStatus(SoapOperationStatus.MOCKED);
soapOperation.setResponseStrategy(SoapResponseStrategy.RANDOM);
soapOperation.setForwardedEndpoint(address.getLocation());
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<UpdateSoapPortsStatusOutput> process(final ServiceTask<UpdateSoapPortsStatusInput> serviceTask) {
    final UpdateSoapPortsStatusInput input = serviceTask.getInput();
    final SoapOperationStatus soapOperationStatus = input.getOperationStatus();
    final List<SoapOperation> operations = this.operationRepository.findWithPortId(input.getPortId());
    operations.forEach(soapOperation -> {
          soapOperation.setStatus(soapOperationStatus);
          this.operationRepository.update(soapOperation.getId(), soapOperation);
        });
    return createServiceResult(UpdateSoapPortsStatusOutput.builder().build());
  }
}
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

  /**
   * 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<UpdateSoapOperationsStatusOutput> process(final ServiceTask<UpdateSoapOperationsStatusInput> serviceTask) {
    final UpdateSoapOperationsStatusInput input = serviceTask.getInput();
    final SoapOperation soapOperation = this.operationRepository.findOne(input.getOperationId());
    soapOperation.setStatus(input.getOperationStatus());
    this.operationRepository.update(input.getOperationId(), soapOperation);
    return createServiceResult(UpdateSoapOperationsStatusOutput.builder().build());
  }
}
origin: castlemock/castlemock

@Test
public void testEcho(){
  // Input
  final HttpServletRequest httpServletRequest = getMockedHttpServletRequest(REQUEST_BODY);
  final HttpServletResponse httpServletResponse = getHttpServletResponse();
  final SoapOperation soapOperation = getSoapOperation();
  soapOperation.setResponseStrategy(SoapResponseStrategy.SEQUENCE);
  soapOperation.setStatus(SoapOperationStatus.ECHO);
  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(REQUEST_BODY, responseEntity.getBody());
  Assert.assertEquals(HttpStatus.OK, responseEntity.getStatusCode());
  Assert.assertEquals(true, responseEntity.getHeaders().containsKey(CONTENT_TYPE_HEADER));
  Assert.assertEquals(false, responseEntity.getHeaders().containsKey(ACCEPT_HEADER));
  Assert.assertEquals(APPLICATION_XML, responseEntity.getHeaders().get(CONTENT_TYPE_HEADER).get(0));
}
origin: castlemock/castlemock

soapOperation.setStatus(SoapOperationStatus.MOCKED);
serviceProcessor.process(UpdateSoapOperationInput.builder().projectId(soapProjectId)
    .portId(soapPortId)
origin: castlemock/castlemock

soapOperation.setResponseStrategy(SoapResponseStrategy.SEQUENCE);
soapOperation.setSimulateNetworkDelay(false);
soapOperation.setStatus(SoapOperationStatus.MOCKED);
soapOperation.setMockResponses(Arrays.asList(soapMockResponse));
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());
  }
}
origin: castlemock/castlemock

operation.setName(operationV1.getName());
operation.setResponseStrategy(operationV1.getResponseStrategy());
operation.setStatus(operationV1.getStatus());
operation.setHttpMethod(operationV1.getHttpMethod());
operation.setSoapVersion(operationV1.getSoapVersion());
com.castlemock.core.mock.soap.model.project.domainSoapOperationsetStatus

Popular methods of SoapOperation

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

Popular in Java

  • Making http post requests using okhttp
  • setRequestProperty (URLConnection)
  • getSystemService (Context)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Option (scala)
  • Top 12 Jupyter Notebook extensions
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