From f2160f4bd1c8ac67e5a86a6710d431e8932877f9 Mon Sep 17 00:00:00 2001
From: matthew_swift <matthew_swift@localhost>
Date: Fri, 28 May 2010 11:47:51 +0000
Subject: [PATCH] Synchronize SDK on java.net with internal repository.

---
 sdk/tests/unit-tests-testng/src/org/opends/sdk/schema/RegexSyntaxTestCase.java |   61 +++++++++++++++---------------
 1 files changed, 30 insertions(+), 31 deletions(-)

diff --git a/sdk/tests/unit-tests-testng/src/org/opends/sdk/schema/RegexSyntaxTestCase.java b/sdk/tests/unit-tests-testng/src/org/opends/sdk/schema/RegexSyntaxTestCase.java
index 3297e97..8b9cb15 100644
--- a/sdk/tests/unit-tests-testng/src/org/opends/sdk/schema/RegexSyntaxTestCase.java
+++ b/sdk/tests/unit-tests-testng/src/org/opends/sdk/schema/RegexSyntaxTestCase.java
@@ -45,39 +45,10 @@
    * {@inheritDoc}
    */
   @Override
-  protected Syntax getRule()
-  {
-    SchemaBuilder builder = new SchemaBuilder(Schema.getCoreSchema());
-    builder.addPatternSyntax("1.1.1",
-        "Host and Port in the format of HOST:PORT", Pattern
-            .compile("^[a-z-A-Z]+:[0-9.]+\\d$"), false);
-    return builder.toSchema().getSyntax("1.1.1");
-  }
-
-
-
-  /**
-   * {@inheritDoc}
-   */
-  @Override
   @DataProvider(name = "acceptableValues")
   public Object[][] createAcceptableValues()
   {
-    return new Object[][] { { "invalid regex", false },
-        { "host:0.0.0", true }, };
-  }
-
-
-
-  @Test
-  public void testInvalidPattern()
-  {
-    // This should fail due to invalid pattern.
-    SchemaBuilder builder = new SchemaBuilder(Schema.getCoreSchema());
-    builder.addSyntax(
-        "( 1.1.1 DESC 'Host and Port in the format of HOST:PORT' "
-            + " X-PATTERN '^[a-z-A-Z+:[0-@.]+\\d$' )", true);
-    Assert.assertFalse(builder.toSchema().getWarnings().isEmpty());
+    return new Object[][] { { "invalid regex", false }, { "host:0.0.0", true }, };
   }
 
 
@@ -86,11 +57,39 @@
   public void testDecode()
   {
     // This should fail due to invalid pattern.
-    SchemaBuilder builder = new SchemaBuilder(Schema.getCoreSchema());
+    final SchemaBuilder builder = new SchemaBuilder(Schema.getCoreSchema());
     builder.addSyntax(
         "( 1.1.1 DESC 'Host and Port in the format of HOST:PORT' "
             + " X-PATTERN '^[a-z-A-Z]+:[0-9.]+\\d$' )", true);
     builder.toSchema();
   }
 
+
+
+  @Test
+  public void testInvalidPattern()
+  {
+    // This should fail due to invalid pattern.
+    final SchemaBuilder builder = new SchemaBuilder(Schema.getCoreSchema());
+    builder.addSyntax(
+        "( 1.1.1 DESC 'Host and Port in the format of HOST:PORT' "
+            + " X-PATTERN '^[a-z-A-Z+:[0-@.]+\\d$' )", true);
+    Assert.assertFalse(builder.toSchema().getWarnings().isEmpty());
+  }
+
+
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  protected Syntax getRule()
+  {
+    final SchemaBuilder builder = new SchemaBuilder(Schema.getCoreSchema());
+    builder.addPatternSyntax("1.1.1",
+        "Host and Port in the format of HOST:PORT", Pattern
+            .compile("^[a-z-A-Z]+:[0-9.]+\\d$"), false);
+    return builder.toSchema().getSyntax("1.1.1");
+  }
+
 }

--
Gitblit v1.10.0