From 167960a027b7d51813cd34395537ee017659d211 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Wed, 08 Jul 2015 13:26:05 +0000
Subject: [PATCH] AutoRefactor'ed TestNG asserts
---
opendj-server-legacy/src/test/java/org/opends/server/tools/LDAPAuthenticationHandlerTestCase.java | 21 ++++-----------------
1 files changed, 4 insertions(+), 17 deletions(-)
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/tools/LDAPAuthenticationHandlerTestCase.java b/opendj-server-legacy/src/test/java/org/opends/server/tools/LDAPAuthenticationHandlerTestCase.java
index b291155..0a7a9a3 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/tools/LDAPAuthenticationHandlerTestCase.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/tools/LDAPAuthenticationHandlerTestCase.java
@@ -31,6 +31,7 @@
import java.net.Socket;
import java.net.UnknownHostException;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
@@ -108,28 +109,14 @@
String[] supportedMechanisms =
LDAPAuthenticationHandler.getSupportedSASLMechanisms();
assertNotNull(supportedMechanisms);
- assertTrue(supportedMechanisms.length == 6);
-
- boolean found = false;
- for (String name : supportedMechanisms)
- {
- found = name.equals(saslMechanismName);
- if (found)
- {
- break;
- }
- }
-
- assertTrue(found);
+ assertEquals(supportedMechanisms.length, 6);
+ assertTrue(Arrays.asList(supportedMechanisms).contains(saslMechanismName));
}
-
-
/**
* Tests the <CODE>getSASLProperties</CODE> method.
*
- * @param saslMechanismName The name for which to retrieve the applicable
- * properties.
+ * @param saslMechanismName The name for which to retrieve the applicable properties.
*/
@Test(dataProvider = "saslMechanisms")
public void testGetSASLProperties(String saslMechanismName)
--
Gitblit v1.10.0