Examples of takeRequest()


Examples of buildcraft.api.robots.IRequestProvider.takeRequest()

              && !isBlacklisted(requestFound.stack)
              && filter.matches(requestFound.stack)) {
            requestFound.station = station;

            if (take) {
              if (provider.takeRequest(i, robot)) {
                return requestFound;
              }
            } else {
              return requestFound;
            }
View Full Code Here

Examples of com.google.mockwebserver.MockWebServer.takeRequest()

      SequentialMultipartUploadStrategy api = mockSequentialMultipartUploadStrategy(url.get().toString(), partSize);

      try {
         assertEquals(api.execute("container", new BlobBuilderImpl().name("foo").payload(bytes).build()), "fff");
      } finally {
         RecordedRequest authRequest = server.takeRequest();
         assertEquals(authRequest.getRequestLine(), "POST /tokens HTTP/1.1");
         assertEquals(new String(authRequest.getBody()), authRequestBody);
         assertEquals(authRequest.getHeader("Content-Length"), String.valueOf(authRequestBody.length()));

         RecordedRequest part1 = server.takeRequest();
View Full Code Here

Examples of com.squareup.okhttp.mockwebserver.MockWebServer.takeRequest()

         SwiftApi api = api(server.getUrl("/").toString(), "openstack-swift");
         assertTrue(api.objectApiInRegionForContainer("DFW", "foo")
            .copy("bar.txt", "bar", "foo.txt"));
             
         assertEquals(server.getRequestCount(), 2);
         assertEquals(server.takeRequest().getRequestLine(), "POST /tokens HTTP/1.1");
        
         RecordedRequest copyRequest = server.takeRequest();
         assertEquals(copyRequest.getRequestLine(),
               "PUT /v1/MossoCloudFS_5bcf396e-39dd-45ff-93a1-712b9aba90a9/foo/bar.txt HTTP/1.1");
      } finally {
View Full Code Here

Examples of com.squareup.okhttp.mockwebserver.MockWebServer.takeRequest()

            .copy("bar.txt", "bar", "foo.txt"));
             
         assertEquals(server.getRequestCount(), 2);
         assertEquals(server.takeRequest().getRequestLine(), "POST /tokens HTTP/1.1");
        
         RecordedRequest copyRequest = server.takeRequest();
         assertEquals(copyRequest.getRequestLine(),
               "PUT /v1/MossoCloudFS_5bcf396e-39dd-45ff-93a1-712b9aba90a9/foo/bar.txt HTTP/1.1");
      } finally {
         server.shutdown();
      }
View Full Code Here

Examples of com.squareup.okhttp.mockwebserver.MockWebServer.takeRequest()

               newByteArrayPayload(tarGz), "tar.gz");
         assertEquals(response.created(), 10);
         assertTrue(response.errors().isEmpty());

         assertEquals(server.getRequestCount(), 2);
         assertEquals(server.takeRequest().getRequestLine(), "POST /tokens HTTP/1.1");
         RecordedRequest extractRequest = server.takeRequest();
         assertEquals(extractRequest.getRequestLine(),
               "PUT /v1/MossoCloudFS_5bcf396e-39dd-45ff-93a1-712b9aba90a9/myContainer?extract-archive=tar.gz HTTP/1.1");
         assertEquals(extractRequest.getBody(), tarGz);
      } finally {
View Full Code Here

Examples of com.squareup.okhttp.mockwebserver.MockWebServer.takeRequest()

         assertEquals(response.created(), 10);
         assertTrue(response.errors().isEmpty());

         assertEquals(server.getRequestCount(), 2);
         assertEquals(server.takeRequest().getRequestLine(), "POST /tokens HTTP/1.1");
         RecordedRequest extractRequest = server.takeRequest();
         assertEquals(extractRequest.getRequestLine(),
               "PUT /v1/MossoCloudFS_5bcf396e-39dd-45ff-93a1-712b9aba90a9/myContainer?extract-archive=tar.gz HTTP/1.1");
         assertEquals(extractRequest.getBody(), tarGz);
      } finally {
         server.shutdown();
View Full Code Here

Examples of com.squareup.okhttp.mockwebserver.MockWebServer.takeRequest()

                     .name("test_container_2") //
                     .objectCount(1) //
                     .bytesUsed(17).build()));

         assertEquals(server.getRequestCount(), 2);
         assertEquals(server.takeRequest().getRequestLine(), "POST /tokens HTTP/1.1");
         assertEquals(server.takeRequest().getRequestLine(),
               "GET /v1/MossoCloudFS_5bcf396e-39dd-45ff-93a1-712b9aba90a9/?format=json HTTP/1.1");
      } finally {
         server.shutdown();
      }
View Full Code Here

Examples of com.squareup.okhttp.mockwebserver.MockWebServer.takeRequest()

                     .objectCount(1) //
                     .bytesUsed(17).build()));

         assertEquals(server.getRequestCount(), 2);
         assertEquals(server.takeRequest().getRequestLine(), "POST /tokens HTTP/1.1");
         assertEquals(server.takeRequest().getRequestLine(),
               "GET /v1/MossoCloudFS_5bcf396e-39dd-45ff-93a1-712b9aba90a9/?format=json HTTP/1.1");
      } finally {
         server.shutdown();
      }
   }
View Full Code Here

Examples of com.squareup.okhttp.mockwebserver.MockWebServer.takeRequest()

                     .name("test_container_2") //
                     .objectCount(1) //
                     .bytesUsed(17).build()));

         assertEquals(server.getRequestCount(), 2);
         assertEquals(server.takeRequest().getRequestLine(), "POST /tokens HTTP/1.1");
         assertEquals(server.takeRequest().getRequestLine(),
               "GET /v1/MossoCloudFS_5bcf396e-39dd-45ff-93a1-712b9aba90a9/?format=json&marker=test HTTP/1.1");
      } finally {
         server.shutdown();
      }
View Full Code Here

Examples of com.squareup.okhttp.mockwebserver.MockWebServer.takeRequest()

                     .objectCount(1) //
                     .bytesUsed(17).build()));

         assertEquals(server.getRequestCount(), 2);
         assertEquals(server.takeRequest().getRequestLine(), "POST /tokens HTTP/1.1");
         assertEquals(server.takeRequest().getRequestLine(),
               "GET /v1/MossoCloudFS_5bcf396e-39dd-45ff-93a1-712b9aba90a9/?format=json&marker=test HTTP/1.1");
      } finally {
         server.shutdown();
      }
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.