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

vharseko
04.37.2018 63377c8013bcb3513cfce0766c225b70d11ef09f
remove duplicate assertNotEquals
2 files modified
40 ■■■■ changed files
opendj-server-legacy/src/test/java/org/opends/server/TestCaseUtils.java 38 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/test/java/org/opends/server/extensions/ExternalSASLMechanismHandlerTestCase.java 2 ●●● patch | view | raw | blame | history
opendj-server-legacy/src/test/java/org/opends/server/TestCaseUtils.java
@@ -1923,26 +1923,26 @@
    return dump.toString();
  }
  /** FIXME Replace with {@link Assert#assertNotEquals(Object, Object)} once we upgrade to testng >= 6.1. */
  public static void assertNotEquals(Object actual1, Object actual2)
  {
    assertNotEquals(actual1, actual2, null);
  }
//  /** FIXME Replace with {@link Assert#assertNotEquals(Object, Object)} once we upgrade to testng >= 6.1. */
//  public static void assertNotEquals(Object actual1, Object actual2)
//  {
//    assertNotEquals(actual1, actual2, null);
//  }
  /** FIXME Replace with {@link Assert#assertNotEquals(Object, Object, String)} once we upgrade to testng >= 6.1. */
  public static void assertNotEquals(Object actual1, Object actual2, String message)
  {
    try
    {
      Assert.assertEquals(actual1, actual2);
      Assert.fail(message);
    }
    catch (AssertionError e)
    {
      // this is good: they are not equals
      return;
    }
  }
//  /** FIXME Replace with {@link Assert#assertNotEquals(Object, Object, String)} once we upgrade to testng >= 6.1. */
//  public static void assertNotEquals(Object actual1, Object actual2, String message)
//  {
//    try
//    {
//      Assert.assertEquals(actual1, actual2);
//      Assert.fail(message);
//    }
//    catch (AssertionError e)
//    {
//      // this is good: they are not equals
//      return;
//    }
//  }
  public static int runLdapSearchTrustCertificateForSession(final String[] args)
  {
opendj-server-legacy/src/test/java/org/opends/server/extensions/ExternalSASLMechanismHandlerTestCase.java
@@ -278,7 +278,7 @@
        Connection conn = factory.getConnection())
    {
      BindResult result = conn.bind(Requests.newExternalSASLBindRequest());
      TestCaseUtils.assertNotEquals(result.getResultCode(), ResultCode.SUCCESS);
      assertNotEquals(result.getResultCode(), ResultCode.SUCCESS);
    }
 }