Package com.squareup.okhttp.mockwebserver

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


         assertRequestHasCommonFields(server.takeRequest(), "/events/7499");
         assertNotNull(event);
         assertEquals(event.getStatus(), Status.DONE);
      } finally {
         api.close();
         server.shutdown();
      }
   }

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


         assertRequestHasCommonFields(server.takeRequest(), "/events/7499");
         assertNotNull(event);
         assertEquals(event.getStatus(), Status.PENDING);
      } finally {
         api.close();
         server.shutdown();
      }
   }

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

         assertRequestHasCommonFields(server.takeRequest(), "/events/7499");
         assertNull(event);
      } finally {
         api.close();
         server.shutdown();
      }
   }
}
View Full Code Here

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

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

         assertNotNull(droplet.getSnapshots());
         assertEquals(droplet.getName(), "test222");
         assertEquals(droplet.getStatus(), Status.ACTIVE);
      } finally {
         api.close();
         server.shutdown();
      }
   }

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

         assertRequestHasCommonFields(server.takeRequest(), "/droplets/100823");
         assertNull(droplet);
      } finally {
         api.close();
         server.shutdown();
      }
   }

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

         assertNotNull(droplet);
         assertEquals(droplet.getName(), "test");
      } finally {
         api.close();
         server.shutdown();
      }
   }

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

         assertNotNull(droplet);
         assertEquals(droplet.getName(), "test");
      } finally {
         api.close();
         server.shutdown();
      }
   }

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

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

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

         }

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

   public void testPowerCycleDroplet() 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.