Package by.stub.yaml.stubs

Examples of by.stub.yaml.stubs.StubRequest


   private void handleMapNode(final StubHttpLifecycle stubHttpLifecycle, final Map.Entry<String, Object> parentNode) throws Exception {

      final Map<String, Object> yamlProperties = (Map<String, Object>) parentNode.getValue();

      if (parentNode.getKey().equals(YAML_NODE_REQUEST)) {
         final StubRequest targetStub = unmarshallYamlMapToTargetStub(yamlProperties, StubRequestBuilder.class);
         stubHttpLifecycle.setRequest(targetStub);

         ConsoleUtils.logUnmarshalledStubRequest(targetStub.getMethod(), targetStub.getUrl());

      } else {
         final StubResponse targetStub = unmarshallYamlMapToTargetStub(yamlProperties, StubResponseBuilder.class);
         stubHttpLifecycle.setResponse(targetStub);
      }
View Full Code Here


   private void handleMapNode(final StubHttpLifecycle stubHttpLifecycle, final Map.Entry<String, Object> parentNode) throws Exception {

      final Map<String, Object> yamlProperties = (Map<String, Object>) parentNode.getValue();

      if (parentNode.getKey().equals(YamlProperties.REQUEST)) {
         final StubRequest targetStub = unmarshallYamlMapToTargetStub(yamlProperties, new StubRequestBuilder());
         stubHttpLifecycle.setRequest(targetStub);

         ConsoleUtils.logUnmarshalledStubRequest(targetStub.getMethod(), targetStub.getUrl());

      } else {
         final StubResponse targetStub = unmarshallYamlMapToTargetStub(yamlProperties, new StubResponseBuilder());
         stubHttpLifecycle.setResponse(targetStub);
      }
View Full Code Here

   }

   @Override
   public StubRequest build() throws Exception {
      ReflectionUtils.injectObjectFields(this, fieldNameAndValues);
      return new StubRequest(url, post, file, method, headers, query);
   }
View Full Code Here

         .withSequenceResponseLiteralBody(sequenceResponseBody)
         .build();

      loadYamlToDataStore(yaml);

      final StubRequest assertingRequest =
         REQUEST_BUILDER
            .withUrl(url)
            .withMethodGet().build();

      final StubResponse foundStubResponse = stubbedDataManager.findStubResponseFor(assertingRequest);
View Full Code Here

         .withSequenceResponseFoldedBody(sequenceResponseBody)
         .build();

      loadYamlToDataStore(yaml);

      final StubRequest assertingRequest =
         REQUEST_BUILDER
            .withUrl(url)
            .withMethodGet().build();

      final StubResponse irrelevantFirstSequenceResponse = stubbedDataManager.findStubResponseFor(assertingRequest);
View Full Code Here

         .withSequenceResponseFoldedBody("OMFG")
         .build();

      loadYamlToDataStore(yaml);

      final StubRequest assertingRequest =
         REQUEST_BUILDER
            .withUrl(url)
            .withMethodGet().build();

      final StubResponse irrelevantFirstSequenceResponse = stubbedDataManager.findStubResponseFor(assertingRequest);
View Full Code Here

         .withHeaders(expectedHeaderKey, expectedHeaderValue)
         .withLiteralBody(expectedBody).build();

      loadYamlToDataStore(yaml);

      final StubRequest assertingRequest =
         REQUEST_BUILDER
            .withUrl(url)
            .withMethodGet().build();

      final StubResponse foundStubResponse = stubbedDataManager.findStubResponseFor(assertingRequest);
View Full Code Here

         .withStatus(expectedStatus)
         .withLiteralBody(expectedBody).build();

      loadYamlToDataStore(yaml);

      final StubRequest assertingRequest =
         REQUEST_BUILDER
            .withUrl(url)
            .withMethodGet().build();

      final StubResponse foundStubResponse = stubbedDataManager.findStubResponseFor(assertingRequest);
View Full Code Here

         .withStatus(expectedStatus)
         .withLiteralBody(expectedBody).build();

      loadYamlToDataStore(yaml);

      final StubRequest assertingRequest =
         REQUEST_BUILDER
            .withUrl(url)
            .withMethodGet()
            .withHeaders(StubRequest.AUTH_HEADER, "Basic Ym9iOnNlY3JldA==").build()//bob:secret
View Full Code Here

         .withStatus(expectedStatus)
         .withLiteralBody(expectedBody).build();

      loadYamlToDataStore(yaml);

      final StubRequest assertingRequest =
         REQUEST_BUILDER
            .withUrl(url)
            .withMethodGet().build();

      final StubResponse foundStubResponse = stubbedDataManager.findStubResponseFor(assertingRequest);
View Full Code Here

TOP

Related Classes of by.stub.yaml.stubs.StubRequest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.