From 449849405fe4828f581474cd840f1c2754b53d7f Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Tue, 24 Sep 2013 14:41:02 +0000
Subject: [PATCH] LDAPURLTest.java: Silencing annoying warnings in Continuous Integration.
---
opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/types/LDAPURLTest.java | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/types/LDAPURLTest.java b/opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/types/LDAPURLTest.java
index d5e68e2..9595dea 100644
--- a/opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/types/LDAPURLTest.java
+++ b/opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/types/LDAPURLTest.java
@@ -83,6 +83,7 @@
LDAPURL.decode(sample, true);
}
+ @Test
public void decodeSampleLDAP() throws Exception
{
final String sample = "ldap://";
@@ -93,6 +94,7 @@
assertThat(ldapURL.toString()).isEqualTo(sample + "/" + DEFAULT_END_URL);
}
+ @Test
public void decodeSampleLDAPS() throws Exception
{
final String sample = "ldaps://";
@@ -103,6 +105,7 @@
assertThat(ldapURL.toString()).isEqualTo(sample + "/" + DEFAULT_END_URL);
}
+ @Test
public void decodeSampleLDAPWithUselessSlash() throws Exception
{
final String sample = "ldap:///";
@@ -147,6 +150,7 @@
assertThat(ldapURL.getExtensions()).isEmpty();
}
+ @Test
public void decodeSampleLDAPWithAttributes() throws Exception
{
final String sample = "ldap://localhost/?cn,tel,mail";
@@ -162,6 +166,7 @@
assertThat(ldapURL.toString()).isEqualTo("ldap://localhost:389/?cn,tel,mail?base?" + DEFAULT_SEARCH_FILTER);
}
+ @Test
public void decodeSampleLDAPWithExtensions() throws Exception
{
final String sample = "ldap://localhost/????ext1,ext2,ext3";
@@ -227,6 +232,7 @@
LDAPURL.decode(sample, true);
}
+ @Test
public void decodeComplexSample() throws Exception
{
final String sample =
@@ -243,6 +249,7 @@
assertThat(ldapURL.toString()).isEqualToIgnoringCase(sample);
}
+ @Test
public void decodeComplexSampleWithUrlDecode() throws Exception
{
final String sample =
@@ -262,7 +269,7 @@
sample.replaceAll("%2F", "/"));
}
-
+ @Test
public void urlDecodeNull() throws Exception
{
assertEquals(LDAPURL.urlDecode(null), "");
@@ -286,6 +293,7 @@
assertNull(LDAPURL.urlDecode("%1z"));
}
+ @Test
public void urlDecodeAllPercentSigns() throws Exception
{
String decoded1 = LDAPURL.urlDecode("%21%23%24%26%27%28%29%2A%2B%2C%2F%3A%3B%3D%3F%40%5B%5D");
--
Gitblit v1.10.0