From c2371257396d52a53ea9427f1d74c81049a773ce Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Tue, 18 Feb 2014 08:55:37 +0000
Subject: [PATCH] OPENDJ-1308 Migrate schema support
---
opendj-server3x-adapter/src/test/java/org/forgerock/opendj/adapter/server3x/ConvertersTestCase.java | 29 ++++-------------------------
1 files changed, 4 insertions(+), 25 deletions(-)
diff --git a/opendj-server3x-adapter/src/test/java/org/forgerock/opendj/adapter/server3x/ConvertersTestCase.java b/opendj-server3x-adapter/src/test/java/org/forgerock/opendj/adapter/server3x/ConvertersTestCase.java
index e713084..dd4a6e0 100644
--- a/opendj-server3x-adapter/src/test/java/org/forgerock/opendj/adapter/server3x/ConvertersTestCase.java
+++ b/opendj-server3x-adapter/src/test/java/org/forgerock/opendj/adapter/server3x/ConvertersTestCase.java
@@ -28,7 +28,6 @@
import static org.fest.assertions.Assertions.*;
import static org.forgerock.opendj.adapter.server3x.Converters.*;
import static org.mockito.Mockito.*;
-import static org.testng.Assert.*;
import java.net.InetAddress;
import java.util.Iterator;
@@ -364,13 +363,13 @@
Modification mod = new Modification(ModificationType.ADD, attribute);
org.opends.server.types.RawModification srvModification = to(mod);
- assertThat(srvModification.getModificationType().toString()).isEqualTo("Add");
+ assertThat(srvModification.getModificationType()).isEqualTo(ModificationType.ADD);
assertThat(srvModification.getAttribute().getAttributeType()).isEqualTo("test");
assertThat(srvModification.getAttribute().getValues().size()).isEqualTo(2);
mod = new Modification(ModificationType.INCREMENT, attribute);
srvModification = to(mod);
- assertThat(srvModification.getModificationType().toString()).isEqualTo("Increment");
+ assertThat(srvModification.getModificationType()).isEqualTo(ModificationType.INCREMENT);
}
@Test
@@ -382,13 +381,13 @@
Modification mod = new Modification(ModificationType.ADD, attribute);
org.opends.server.types.Modification srvModification = toModification(mod);
- assertThat(srvModification.getModificationType().toString()).isEqualTo("Add");
+ assertThat(srvModification.getModificationType()).isEqualTo(ModificationType.ADD);
assertThat(srvModification.getAttribute().getAttributeType().getNameOrOID()).isEqualTo("test");
assertThat(srvModification.getAttribute().size()).isEqualTo(2);
mod = new Modification(ModificationType.INCREMENT, attribute);
srvModification = toModification(mod);
- assertThat(srvModification.getModificationType().toString()).isEqualTo("Increment");
+ assertThat(srvModification.getModificationType()).isEqualTo(ModificationType.INCREMENT);
}
/**
@@ -519,26 +518,6 @@
ByteString.empty());
}
- @Test
- public static void testToSearchScope() {
- org.opends.server.types.SearchScope[] expected = org.opends.server.types.SearchScope.values();
- List<org.forgerock.opendj.ldap.SearchScope> actual = org.forgerock.opendj.ldap.SearchScope.values();
- for (int i = 0; i < expected.length; i++) {
- assertEquals(to(actual.get(i)), expected[i]);
- }
- assertNull(to((org.forgerock.opendj.ldap.SearchScope) null));
- }
-
- @Test
- public static void testFromSearchScope() {
- org.opends.server.types.SearchScope[] actual = org.opends.server.types.SearchScope.values();
- List<org.forgerock.opendj.ldap.SearchScope> expected = org.forgerock.opendj.ldap.SearchScope.values();
- for (int i = 0; i < actual.length; i++) {
- assertEquals(from(actual[i]), expected.get(i));
- }
- assertNull(from((org.opends.server.types.SearchScope) null));
- }
-
@DataProvider(name = "operation result type")
public Object[][] getOperationResultTypes() {
return new Object[][] {
--
Gitblit v1.10.0