mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

neil_a_wilson
15.13.2007 4cb2749aff182db1da02dbda4e4c431d5ed14fc4
opends/tests/unit-tests-testng/src/server/org/opends/server/tools/LDAPSearchTestCase.java
@@ -566,6 +566,56 @@
  /**
   * Tests a simple invocation using the "--noop" option with a valid argument
   * set.
   */
  @Test()
  public void testNoOpSearchValidArguments()
  {
    String[] args =
    {
      "-h", "doesnt.need.to.resolve",
      "-p", String.valueOf(TestCaseUtils.getServerLdapPort()),
      "-V", "3",
      "-D", "cn=Directory Manager",
      "-w", "password",
      "-b", "",
      "-s", "base",
      "--noop",
      "(objectClass=*)"
    };
    assertEquals(LDAPSearch.mainSearch(args, false, null, System.err), 0);
  }
  /**
   * Tests a simple invocation using the "--noop" option with an invalid
   * argument set.
   */
  @Test()
  public void testNoOpSearchInvalidArguments()
  {
    String[] args =
    {
      "-h", "doesnt.need.to.resolve",
      "-p", String.valueOf(TestCaseUtils.getServerLdapPort()),
      "-V", "3",
      "-D", "cn=Directory Manager",
      "-w", "password",
      "-b", "",
      "-s", "invalid",
      "--noop",
      "(objectClass=*)"
    };
    assertFalse(LDAPSearch.mainSearch(args, false, null, System.err) == 0);
  }
  /**
   * Tests a simple LDAP search over SSL using blind trust.
   */
  @Test()