From 48e73e27e5a6b254471fabeefa3a197dd071c1b8 Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Mon, 02 Oct 2006 16:32:07 +0000
Subject: [PATCH] Perform significant refactoring in the core and plugin code in order to help make it easier for external developers to extend OpenDS. In particular, this is a big step towards eliminating the need for developers to reference anything in the core package, and it's also a signficant simplification to the plugin API because it helps expose which operation methods are safe to call at various points in the plugin processing.
---
opends/tests/unit-tests-testng/src/server/org/opends/server/synchronization/ServerStateTest.java | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/opends/tests/unit-tests-testng/src/server/org/opends/server/synchronization/ServerStateTest.java b/opends/tests/unit-tests-testng/src/server/org/opends/server/synchronization/ServerStateTest.java
index 40ab358..3e303fa 100644
--- a/opends/tests/unit-tests-testng/src/server/org/opends/server/synchronization/ServerStateTest.java
+++ b/opends/tests/unit-tests-testng/src/server/org/opends/server/synchronization/ServerStateTest.java
@@ -41,7 +41,6 @@
import org.opends.server.api.ClientConnection;
import org.opends.server.core.AddOperation;
import org.opends.server.core.DeleteOperation;
-import org.opends.server.core.DirectoryException;
import org.opends.server.core.DirectoryServer;
import org.opends.server.core.ModifyDNOperation;
import org.opends.server.core.ModifyOperation;
@@ -53,6 +52,7 @@
import org.opends.server.types.AttributeType;
import org.opends.server.types.AttributeValue;
import org.opends.server.types.Control;
+import org.opends.server.types.DirectoryException;
import org.opends.server.types.DN;
import org.opends.server.types.Modification;
import org.opends.server.types.ModificationType;
@@ -67,7 +67,7 @@
*/
public class ServerStateTest extends SynchronizationTestCase
{
-
+
/**
* Create ChangeNumber Data
*/
@@ -89,14 +89,14 @@
// Check constructor
DN dn = DN.decode("cn=com");
ServerState serverState = new ServerState(dn) ;
-
+
// Check Load
// serverState.loadState() ;
// TODO Check result
-
+
// Check getServerStateDn()
DN returned_DN = serverState.getServerStateDn();
- // TODO Check the returned DN
+ // TODO Check the returned DN
// Check update
assertFalse(serverState.update(null));
@@ -106,29 +106,29 @@
cn1 = new ChangeNumber(cn.getTime()+1,cn.getSeqnum(),cn.getServerId());
cn2 = new ChangeNumber(cn1.getTime(),cn1.getSeqnum()+1,cn1.getServerId());
cn3 = new ChangeNumber(cn2.getTime(),cn2.getSeqnum(),(short)(cn2.getServerId()+1));
-
+
assertTrue(serverState.update(cn1)) ;
assertTrue(serverState.update(cn2)) ;
assertTrue(serverState.update(cn3)) ;
-
+
// Check toStringSet
ChangeNumber[] cns = {cn2,cn3};
Set<String> stringSet = serverState.toStringSet();
- assertEquals(cns.length, stringSet.size());
+ assertEquals(cns.length, stringSet.size());
// TODO Check the value
-
+
// Check getMaxChangeNumber
assertEquals(cn2.compareTo(serverState.getMaxChangeNumber(cn2.getServerId())),0);
assertEquals(cn3.compareTo(serverState.getMaxChangeNumber(cn3.getServerId())),0);
-
+
// Check the toString
String stringRep = serverState.toString() ;
// TODO Check the value
-
+
// Check getBytes
byte[] b = serverState.getBytes();
ServerState generatedServerState = new ServerState(b,0,b.length -1) ;
assertEquals(b, generatedServerState.getBytes()) ;
-
+
}
}
--
Gitblit v1.10.0