From 0743c024632295d3e39dae9c7978f2612375e581 Mon Sep 17 00:00:00 2001
From: matthew_swift <matthew_swift@localhost>
Date: Mon, 11 Jun 2007 10:57:16 +0000
Subject: [PATCH] Add test for attribute type definition encodeValue implementation.
---
opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/admin/AttributeTypePropertyDefinitionTest.java | 18 ++++++++++++++++--
1 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/admin/AttributeTypePropertyDefinitionTest.java b/opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/admin/AttributeTypePropertyDefinitionTest.java
index 1c3fa04..f7276a7 100644
--- a/opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/admin/AttributeTypePropertyDefinitionTest.java
+++ b/opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/admin/AttributeTypePropertyDefinitionTest.java
@@ -29,11 +29,10 @@
-import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.*;
import org.opends.server.TestCaseUtils;
import org.opends.server.admin.std.meta.RootCfgDefn;
-import org.opends.server.backends.jeb.RootContainer;
import org.opends.server.core.DirectoryServer;
import org.opends.server.types.AttributeType;
import org.testng.annotations.BeforeClass;
@@ -101,6 +100,21 @@
/**
+ * Tests encodeValue()
+ *
+ * @param value
+ * to decode/encode
+ */
+ @Test(dataProvider = "testDecodeValueLegalData")
+ public void testEncodeValue(String value) {
+ AttributeTypePropertyDefinition.setCheckSchema(true);
+ AttributeTypePropertyDefinition d = createPropertyDefinition();
+ assertEquals(d.encodeValue(d.decodeValue(value)), value);
+ }
+
+
+
+ /**
* @return data for testing illegal values
*/
@DataProvider(name = "testDecodeValueIllegalData")
--
Gitblit v1.10.0