Package org.jclouds.enterprisechef.domain

Examples of org.jclouds.enterprisechef.domain.Group


      assertNotNull(groups);
      assertFalse(groups.isEmpty());
   }

   public void testGetUnexistingGroup() {
      Group group = api.getGroup(UUID.randomUUID().toString());
      assertNull(group);
   }
View Full Code Here


      assertNull(group);
   }

   public void testCreateGroup() {
      api.createGroup(GROUP_NAME);
      Group group = api.getGroup(GROUP_NAME);
      assertNotNull(group);
      assertEquals(group.getGroupname(), GROUP_NAME);
   }
View Full Code Here

      assertEquals(group.getGroupname(), GROUP_NAME);
   }

   @Test(dependsOnMethods = "testCreateGroup")
   public void testUpdateGroup() {
      Group group = api.getGroup(GROUP_NAME);
      Group updated = Group.builder(group.getGroupname()) //
            .actors(group.getActors()) //
            .orgname(group.getOrgname()) //
            .name(group.getName()) //
            .groups(group.getGroups()) //
            .client(ORG_NAME + "-validator") //
View Full Code Here

   }

   @Test(dependsOnMethods = "testUpdateGroup")
   public void testDeleteGroup() {
      api.deleteGroup(GROUP_NAME);
      Group group = api.getGroup(GROUP_NAME);
      assertNull(group);
   }
View Full Code Here

                  .addHeader("Accept", MediaType.APPLICATION_JSON).build()), //
            HttpResponse.builder().statusCode(200)
                  .payload(payloadFromResourceWithContentType("/group.json", MediaType.APPLICATION_JSON)) //
                  .build());

      Group group = api.getGroup("admins");
      assertEquals(group.getName(), "admins");
      assertEquals(group.getGroupname(), "admins");
   }
View Full Code Here

            .addHeader("Accept", MediaType.APPLICATION_JSON) //
            .payload(payloadFromResourceWithContentType("/group-update.json", MediaType.APPLICATION_JSON)) //
            .build()), //
            HttpResponse.builder().statusCode(200).build());

      Group group = Group.builder("admins").client("abiquo").group("admins").user("nacx").build();
      api.updateGroup(group);
   }
View Full Code Here

            .addHeader("Accept", MediaType.APPLICATION_JSON) //
            .payload(payloadFromResourceWithContentType("/group-update.json", MediaType.APPLICATION_JSON)) //
            .build()), //
            HttpResponse.builder().statusCode(404).build());

      Group group = Group.builder("admins").client("abiquo").group("admins").user("nacx").build();
      api.updateGroup(group);
   }
View Full Code Here

      String payload = Strings2.toStringAndClose(newRequest.getPayload().getInput());
      assertEquals(payload, "{\"groupname\":\"foo\",\"actors\":{\"clients\":[],\"groups\":[],\"users\":[]}}");
   }

   public void testBindNameAndLists() throws IOException {
      Group group = Group.builder("foo").client("nacx-validator").group("admins").user("nacx").build();

      HttpRequest request = HttpRequest.builder().method("POST").endpoint(URI.create("http://localhost")).build();
      HttpRequest newRequest = binder.bindToRequest(request, group);

      String payload = Strings2.toStringAndClose(newRequest.getPayload().getInput());
View Full Code Here

                  .addHeader("Accept", MediaType.APPLICATION_JSON).build()), //
            HttpResponse.builder().statusCode(200)
                  .payload(payloadFromResourceWithContentType("/group.json", MediaType.APPLICATION_JSON)) //
                  .build());

      Group group = api.getGroup("admins");
      assertEquals(group.getName(), "admins");
      assertEquals(group.getGroupname(), "admins");
   }
View Full Code Here

            .addHeader("Accept", MediaType.APPLICATION_JSON) //
            .payload(payloadFromResourceWithContentType("/group-update.json", MediaType.APPLICATION_JSON)) //
            .build()), //
            HttpResponse.builder().statusCode(200).build());

      Group group = Group.builder("admins").client("abiquo").group("admins").user("nacx").build();
      api.updateGroup(group);
   }
View Full Code Here

TOP

Related Classes of org.jclouds.enterprisechef.domain.Group

Copyright © 2018 www.massapicom. 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.