Package domain

Examples of domain.User


      databases2builder.add( "databaseB" );
      databases2builder.add( "databaseC" );
      Set<String> databases2 = databases2builder.build();
      Set<String> databases3 = Sets.newHashSet();
      databases3.add( "databaseD" );
      User user1 = User.builder().databases( databases1 ).name("dbuser1").password("password").build();
      User user2 = User.builder().databases( databases2 ).name("dbuser2").password("password").build();
      User user3 = User.builder().databases( databases3 ).name("dbuser3").password("password").host("192.168.64.64").build();
      Set<User> users = Sets.newHashSet();
      users.add(user1);
      users.add(user2);
      users.add(user3);
     
View Full Code Here


            responseWithKeystoneAccess,
            authenticatedGET().endpoint(endpoint).build(),
            HttpResponse.builder().statusCode(200).payload(payloadFromResource("/user_get.json")).build()
      ).getUserApiForInstanceInZone("instanceId-1234-5678","RegionOne");

      User user = api.get("exampleuser");
      assertEquals(user.getName(), "exampleuser");
      assertEquals(user.getHost(), "%");
      assertEquals(user.getDatabases().size(), 2);
      assertEquals(user.getDatabases().iterator().next(), "databaseA");
   }
View Full Code Here

            responseWithKeystoneAccess,
            authenticatedGET().endpoint(endpoint).build(),
            HttpResponse.builder().statusCode(404).payload(payloadFromResource("/user_get.json")).build()
      ).getUserApiForInstanceInZone("instanceId-1234-5678","RegionOne");

      User user = api.get("exampleuser");
      assertNull(user);
   }
View Full Code Here

            responseWithKeystoneAccess,
            authenticatedGET().endpoint(endpoint).build(),
            HttpResponse.builder().statusCode(200).payload(payloadFromResource("/user_get_withhost.json")).build()
      ).getUserApiForInstanceInZone("instanceId-1234-5678","RegionOne");

      User user = api.get("example.user", "192.168.64.64");
      assertEquals(user.getName(), "example.user");
      assertEquals(user.getHost(), "192.168.64.64");
      assertEquals(user.getIdentifier(), "example.user@192.168.64.64");
      assertEquals(user.getDatabases().size(), 2);
      assertEquals(user.getDatabases().iterator().next(), "databaseA");
   }
View Full Code Here

            responseWithKeystoneAccess,
            authenticatedGET().endpoint(endpoint).build(),
            HttpResponse.builder().statusCode(404).payload(payloadFromResource("/user_get_withhost.json")).build()
      ).getUserApiForInstanceInZone("instanceId-1234-5678","RegionOne");

      User user = api.get("example.user", "192.168.64.64");
      assertNull(user);
   }
View Full Code Here

                .password((String) postParams.get("password"));
        
         builder.host((String) postParams.get("host"));
         builder.databases(databases);
        
         User user = builder.build();
         users.add(user);
      }
      else if( postParams.get("users") != null ) {
         users = (Set<User>) postParams.get("users");
      }
View Full Code Here

      databases2builder.add( "databaseB" );
      databases2builder.add( "databaseC" );
      Set<String> databases2 = databases2builder.build();
      Set<String> databases3 = Sets.newHashSet();
      databases3.add( "databaseD" );
      User user1 = User.builder().databases( databases1 ).name("dbuser1").password("password").build();
      User user2 = User.builder().databases( databases2 ).name("dbuser2").password("password").build();
      User user3 = User.builder().databases( databases3 ).name("dbuser3").password("password").host("192.168.64.64").build();
      Set<User> users = Sets.newHashSet();
      users.add(user1);
      users.add(user2);
      users.add(user3);
     
View Full Code Here

      databases2builder.add( "databaseB" );
      databases2builder.add( "databaseC" );
      Set<String> databases2 = databases2builder.build();
      Set<String> databases3 = Sets.newHashSet();
      databases3.add( "databaseD" );
      User user1 = User.builder().databases( databases1 ).name("dbuser1").password("password").build();
      User user2 = User.builder().databases( databases2 ).name("dbuser2").password("password").build();
      User user3 = User.builder().databases( databases3 ).name("dbuser3").password("password").host("192.168.64.64").build();
      Set<User> users = Sets.newHashSet();
      users.add(user1);
      users.add(user2);
      users.add(user3);
     
View Full Code Here

            responseWithKeystoneAccess,
            authenticatedGET().endpoint(endpoint).build(),
            HttpResponse.builder().statusCode(200).payload(payloadFromResource("/user_get.json")).build()
      ).getUserApiForZoneAndInstance("RegionOne", "instanceId-1234-5678");

      User user = api.get("exampleuser");
      assertEquals(user.getName(), "exampleuser");
      assertEquals(user.getHost(), "%");
      assertEquals(user.getDatabases().size(), 2);
      assertEquals(user.getDatabases().iterator().next(), "databaseA");
   }
View Full Code Here

            responseWithKeystoneAccess,
            authenticatedGET().endpoint(endpoint).build(),
            HttpResponse.builder().statusCode(404).payload(payloadFromResource("/user_get.json")).build()
      ).getUserApiForZoneAndInstance("RegionOne", "instanceId-1234-5678");

      User user = api.get("exampleuser");
      assertNull(user);
   }
View Full Code Here

TOP

Related Classes of domain.User

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.