Examples of OrganizationDto


Examples of com.abiquo.server.core.infrastructure.OrganizationDto

   }

   @Test(expectedExceptions = NullPointerException.class)
   public void testBindLogicServerWithEmptyName() {
      BindOrganizationParameters binder = new BindOrganizationParameters();
      OrganizationDto dto = new OrganizationDto();
      HttpRequest request = HttpRequest.builder().method("GET").endpoint(URI.create("http://localhost")).build();
      binder.bindToRequest(request, dto);
   }
View Full Code Here

Examples of com.abiquo.server.core.infrastructure.OrganizationDto

      binder.bindToRequest(request, dto);
   }

   public void testBindLogicServer() {
      BindOrganizationParameters binder = new BindOrganizationParameters();
      OrganizationDto dto = new OrganizationDto();
      dto.setDn("org");
      HttpRequest request = HttpRequest.builder().method("GET").endpoint(URI.create("http://localhost")).build();
      HttpRequest newRequest = binder.bindToRequest(request, dto);
      assertEquals(newRequest.getRequestLine(), "GET http://localhost?org=org HTTP/1.1");
   }
View Full Code Here

Examples of com.abiquo.server.core.infrastructure.OrganizationDto

      return logicServer;
   }

   public static OrganizationDto organizationPut() {
      OrganizationDto org = new OrganizationDto();
      org.setName("org");
      org.setDn("org-root/org-Finance");
      org.setLevel("1");

      return org;
   }
View Full Code Here

Examples of com.abiquo.server.core.infrastructure.OrganizationDto

   @Override
   public <R extends HttpRequest> R bindToRequest(final R request, final Object input) {
      checkArgument(checkNotNull(input, "input") instanceof OrganizationDto,
            "this binder is only valid for OrganizationDto objects");

      OrganizationDto org = (OrganizationDto) input;

      return (R) request.toBuilder().addQueryParam("org", checkNotNull(org.getDn(), "org.dn")).build();
   }
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.