From 22094368c2865dcfb6daf8366425212b721a4657 Mon Sep 17 00:00:00 2001
From: matthew_swift <matthew_swift@localhost>
Date: Thu, 05 Feb 2009 17:42:14 +0000
Subject: [PATCH] Merge ASN1 branch to trunk
---
opends/tests/unit-tests-testng/src/server/org/opends/server/util/TestStaticUtils.java | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/opends/tests/unit-tests-testng/src/server/org/opends/server/util/TestStaticUtils.java b/opends/tests/unit-tests-testng/src/server/org/opends/server/util/TestStaticUtils.java
index a087762..0d73baa 100644
--- a/opends/tests/unit-tests-testng/src/server/org/opends/server/util/TestStaticUtils.java
+++ b/opends/tests/unit-tests-testng/src/server/org/opends/server/util/TestStaticUtils.java
@@ -45,6 +45,8 @@
import java.util.List;
import org.opends.server.TestCaseUtils;
+import org.opends.server.types.ByteString;
+import org.opends.server.types.ByteSequence;
import org.testng.Assert;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.DataProvider;
@@ -618,7 +620,7 @@
}
/**
- * Tests the {@link StaticUtils#needsBase64Encoding(byte[])} method.
+ * Tests the {@link StaticUtils#needsBase64Encoding(ByteSequence)} method.
*
* @param s
* The test string.
@@ -630,7 +632,7 @@
@Test(dataProvider = "needsBase64EncodingTestData")
public void testNeedsBase64EncodingBytes(String s, boolean result)
throws Exception {
- byte[] bytes = s != null ? s.getBytes("UTF-8") : null;
+ ByteString bytes = s != null ? ByteString.valueOf(s) : null;
Assert.assertEquals(StaticUtils.needsBase64Encoding(bytes), result);
}
@@ -1021,7 +1023,7 @@
/**
* Tests the
- * {@link StaticUtils#toLowerCase(byte[], StringBuilder, boolean)}
+ * {@link StaticUtils#toLowerCase(ByteSequence, StringBuilder, boolean)}
* method.
*
* @param input
@@ -1036,7 +1038,7 @@
@Test(dataProvider = "stringCaseConversionTestData")
public void testToLowerCaseBytes(String input, String lower, String upper)
throws Exception {
- byte[] bytes = input != null ? input.getBytes("UTF-8") : null;
+ ByteString bytes = input != null ? ByteString.valueOf(input) : null;
StringBuilder buffer = new StringBuilder();
StaticUtils.toLowerCase(bytes, buffer, false);
Assert.assertEquals(buffer.toString(), input != null ? lower : "");
--
Gitblit v1.10.0