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

Jean-Noel Rouvignac
18.55.2014 c2371257396d52a53ea9427f1d74c81049a773ce
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[][] {