コード例 #1
0
  @Override
  public void setUpResources() throws Exception {
    spec = new VirtualNetworkCreateSpec();
    spec.setName("virtualNetworkName");
    spec.setDescription("virtualNetworkDescription");
    spec.setRoutingType(RoutingType.ROUTED);
    spec.setSize(VirtualNetworkCreateSpec.DEFAULT_MIN_NETWORK_SIZE);
    spec.setReservedStaticIpSize(2);

    addResource(new ProjectNetworksResource(frontendClient, paginationConfig));
  }
コード例 #2
0
 @Test
 public void failsToCreateWithInvalidSpec() throws Throwable {
   spec.setName(" bad name");
   assertThat(createNetwork().getStatus(), is(400));
 }