Package org.sonatype.ldaptestsuite

Examples of org.sonatype.ldaptestsuite.LdapServer.stop()


      throws Exception
  {
    for (Entry<String, LdapServer> entry : this.ldapServerMap.entrySet()) {
      LdapServer ldapServer = entry.getValue();
      logger.info("Stopping LDAP server: " + entry.getKey());
      ldapServer.stop();
      ldapServer = null;
    }
    this.ldapServerMap = null;

    super.tearDown();
View Full Code Here


    // exact number
    Assert.assertEquals(1, ldapManager.getUsers(1).size());


    ldapServer.stop();
    Assert.assertEquals(0, ldapManager.getUsers(1).size());

    ldapServer.start();
    Assert.assertEquals(0, ldapManager.getUsers(1).size());
View Full Code Here

    LdapManager ldapManager = this.lookup(LdapManager.class);
    LdapServer ldapServer = this.getLdapServer("default");

    Assert.assertEquals(3, ldapManager.searchUsers("", null).size());

    ldapServer.stop();
    Assert.assertEquals(0, ldapManager.searchUsers("", null).size());

    ldapServer.start();
    Assert.assertEquals(0, ldapManager.searchUsers("", null).size());
View Full Code Here

    LdapManager ldapManager = this.lookup(LdapManager.class);
    LdapServer ldapServer = this.getLdapServer("default");

    Assert.assertNotNull(ldapManager.authenticateUser("brianf", "brianf123"));

    ldapServer.stop();

    try {
      ldapManager.authenticateUser("brianf", "brianf123");
      Assert.fail("Expected AuthenticationException");
    }
View Full Code Here

    expectedGroups.add("snapshots");

    SortedSet<String> actualGroups = ldapManager.getAllGroups();
    Assert.assertEquals(expectedGroups, actualGroups);

    ldapServer.stop();

    Assert.assertEquals(0, ldapManager.getAllGroups().size());

    ldapServer.start();
View Full Code Here

    LdapManager ldapManager = this.lookup(LdapManager.class);
    LdapServer ldapServer = this.getLdapServer("default");

    Assert.assertEquals(3, ldapManager.getAllUsers().size());

    ldapServer.stop();
    Assert.assertEquals(0, ldapManager.getAllUsers().size());

    ldapServer.start();
    Assert.assertEquals(0, ldapManager.getAllUsers().size());
View Full Code Here

    LdapManager ldapManager = this.lookup(LdapManager.class);
    LdapServer ldapServer = this.getLdapServer("default");

    Assert.assertEquals("releases", ldapManager.getGroupName("releases"));

    ldapServer.stop();

    try {
      ldapManager.getGroupName("releases");
      Assert.fail("Expected LdapDAOException");
    }
View Full Code Here

    Assert.assertEquals("brianf", brianf.getUsername());
    Assert.assertEquals(brianf.getUsername() + "123", brianf.getPassword());
    Assert.assertEquals("Brian Fox", brianf.getRealName());
    Assert.assertEquals(2, brianf.getMembership().size());

    ldapServer.stop();
    try {
      ldapManager.getUser("brianf");
      Assert.fail("Expected NoSuchLdapUserException");
    }
    catch (NoSuchLdapUserException e) {
View Full Code Here

    LdapManager ldapManager = this.lookup(LdapManager.class);
    LdapServer ldapServer = this.getLdapServer("default");

    Assert.assertEquals(2, ldapManager.getUserRoles("brianf").size());

    ldapServer.stop();
    try {
      ldapManager.getUserRoles("brianf");
      Assert.fail("Expected LdapDAOException");
    }
    catch (NoLdapUserRolesFoundException e) {
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.