Package com.squareup.okhttp.mockwebserver

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


         assertEquals(server.getRequestCount(), 2);
         assertEquals(server.takeRequest().getRequestLine(), "POST /tokens HTTP/1.1");
         assertEquals(server.takeRequest().getRequestLine(),
               "HEAD /v1/MossoCloudFS_5bcf396e-39dd-45ff-93a1-712b9aba90a9/ HTTP/1.1");
      } finally {
         server.shutdown();
      }
   }

   @Test(expectedExceptions = IllegalStateException.class, expectedExceptionsMessageRegExp = ".*returned a null temporaryUrlKey!")
   public void whenAccountApiDoesntHaveKey() throws Exception {
View Full Code Here


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

         assertRequestHasCommonFields(server.takeRequest(), "/droplets/1/password_reset");
         assertTrue(event > 0);
      } finally {
         api.close();
         server.shutdown();
      }
   }

   public void testResetPasswordForNonexistentDroplet() throws Exception {
      MockWebServer server = mockWebServer();
View Full Code Here

         }

         assertRequestHasCommonFields(server.takeRequest(), "/droplets/1/password_reset");
      } finally {
         api.close();
         server.shutdown();
      }
   }

   public void testResizeDroplet() throws Exception {
      MockWebServer server = mockWebServer();
View Full Code Here

         assertRequestHasParameters(server.takeRequest(), "/droplets/1/resize", ImmutableMultimap.of("size_id", "3"));
         assertTrue(event > 0);
      } finally {
         api.close();
         server.shutdown();
      }
   }

   public void testResizeNonexistentDroplet() throws Exception {
      MockWebServer server = mockWebServer();
View Full Code Here

         }

         assertRequestHasParameters(server.takeRequest(), "/droplets/1/resize", ImmutableMultimap.of("size_id", "3"));
      } finally {
         api.close();
         server.shutdown();
      }
   }

   public void testSnapshotDroplet() throws Exception {
      MockWebServer server = mockWebServer();
View Full Code Here

         assertRequestHasCommonFields(server.takeRequest(), "/droplets/1/snapshot");
         assertTrue(event > 0);
      } finally {
         api.close();
         server.shutdown();
      }
   }

   public void testSnapshotNonexistentDroplet() throws Exception {
      MockWebServer server = mockWebServer();
View Full Code Here

         }

         assertRequestHasCommonFields(server.takeRequest(), "/droplets/1/snapshot");
      } finally {
         api.close();
         server.shutdown();
      }
   }

   public void testSnapshotWithNameDroplet() throws Exception {
      MockWebServer server = mockWebServer();
View Full Code Here

         assertRequestHasParameters(server.takeRequest(), "/droplets/1/snapshot", ImmutableMultimap.of("name", "foo"));
         assertTrue(event > 0);
      } finally {
         api.close();
         server.shutdown();
      }
   }

   public void testSnapshotWithNameNonexistentDroplet() throws Exception {
      MockWebServer server = mockWebServer();
View Full Code Here

         }

         assertRequestHasParameters(server.takeRequest(), "/droplets/1/snapshot", ImmutableMultimap.of("name", "foo"));
      } finally {
         api.close();
         server.shutdown();
      }
   }

   public void testRestoreDroplet() throws Exception {
      MockWebServer server = mockWebServer();
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.