From 60f5dfd7eaa64aa931033c0e5266391ecbbc96fa Mon Sep 17 00:00:00 2001
From: Nicolas Capponi <nicolas.capponi@forgerock.com>
Date: Wed, 25 Sep 2013 07:31:13 +0000
Subject: [PATCH] Fix OPENDJ-18 - keystore import failes due to empty PIN Review CR-2353
---
opends/tests/unit-tests-testng/src/server/org/opends/server/util/CertificateManagerTestCase.java | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/opends/tests/unit-tests-testng/src/server/org/opends/server/util/CertificateManagerTestCase.java b/opends/tests/unit-tests-testng/src/server/org/opends/server/util/CertificateManagerTestCase.java
index 90ef7cf..2065c83 100644
--- a/opends/tests/unit-tests-testng/src/server/org/opends/server/util/CertificateManagerTestCase.java
+++ b/opends/tests/unit-tests-testng/src/server/org/opends/server/util/CertificateManagerTestCase.java
@@ -23,6 +23,7 @@
*
*
* Copyright 2008-2010 Sun Microsystems, Inc.
+ * Portions Copyright 2013 ForgeRock AS
*/
package org.opends.server.util;
@@ -58,10 +59,10 @@
// Get the build root and use it to create a test package directory.
- public static final String BUILD_ROOT =
+ public static final String BUILD_ROOT =
System.getProperty(TestCaseUtils.PROPERTY_BUILD_ROOT);
-
+
/**
* The path to a JKS key store file.
*/
@@ -239,11 +240,11 @@
*
* @throws Exception If a problem occurs.
*/
- @Test(expectedExceptions = { NullPointerException.class })
+ @Test
public void testConstructorNullPIN()
throws Exception
{
- new CertificateManager(JKS_KEY_STORE_PATH, "JKS", null);
+ assertNotNull(new CertificateManager(JKS_KEY_STORE_PATH, "JKS", null));
}
@@ -254,11 +255,11 @@
*
* @throws Exception If a problem occurs.
*/
- @Test(expectedExceptions = { NullPointerException.class })
+ @Test
public void testConstructorEmptyPIN()
throws Exception
{
- new CertificateManager(JKS_KEY_STORE_PATH, "JKS", "");
+ assertNotNull(new CertificateManager(JKS_KEY_STORE_PATH, "JKS", ""));
}
--
Gitblit v1.10.0