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

matthew_swift
11.57.2007 ef7ca88541a36d3affc9b8ed7090f335e56db0c5
Add test for attribute type definition encodeValue implementation.
1 files modified
18 ■■■■ changed files
opends/tests/unit-tests-testng/src/server/org/opends/server/admin/AttributeTypePropertyDefinitionTest.java 18 ●●●● patch | view | raw | blame | history
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")