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

Matthew Swift
04.49.2016 a18241e1d91b5212dc8e4fb9d41d9a2d6c0baa40
opendj-server-legacy/src/test/java/org/opends/server/monitors/GenericMonitorTestCase.java
@@ -18,6 +18,7 @@
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import org.testng.annotations.AfterClass;
@@ -38,33 +39,25 @@
public abstract class GenericMonitorTestCase
       extends MonitorTestCase
{
  /** The configuration entry for this test case. */
  private final String configEntryName;
  protected Entry configEntry;
  GenericMonitorTestCase(String dnString)
  {
    configEntryName = dnString;
  }
  /**
   * Creates a new instance of this monitor test case.
   *
   * @param  dnString  The DN of the configuration entry for this test case, or
   *                   <CODE>null</CODE> if there is none.
   *
   * @throws  Exception  If an unexpected problem occurs.
   */
  protected GenericMonitorTestCase(String dnString)
            throws Exception
  @BeforeClass
  public void beforeClass() throws Exception
  {
    TestCaseUtils.startServer();
    if (dnString != null)
    if (configEntryName != null)
    {
      configEntry = DirectoryServer.getEntry(DN.valueOf(dnString));
      configEntry = DirectoryServer.getEntry(DN.valueOf(configEntryName));
      assertNotNull(configEntry);
    }
  }
  /**
   * Retrieves an initialized instance of the associated monitor provider.
   *