From 6439bba5cc09d6febc59bdc9e0d9bc25f1f1eb18 Mon Sep 17 00:00:00 2001
From: matthew_swift <matthew_swift@localhost>
Date: Wed, 01 Sep 2010 09:04:15 +0000
Subject: [PATCH] Various improvements:

---
 sdk/tests/unit-tests-testng/src/org/opends/sdk/SynchronousConnectionTestCase.java |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/sdk/tests/unit-tests-testng/src/org/opends/sdk/SynchronousConnectionTestCase.java b/sdk/tests/unit-tests-testng/src/org/opends/sdk/SynchronousConnectionTestCase.java
index aa38494..8e2e26f 100644
--- a/sdk/tests/unit-tests-testng/src/org/opends/sdk/SynchronousConnectionTestCase.java
+++ b/sdk/tests/unit-tests-testng/src/org/opends/sdk/SynchronousConnectionTestCase.java
@@ -29,17 +29,17 @@
 
 
 
-import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertNull;
 import static org.testng.Assert.assertFalse;
 import static org.testng.Assert.assertTrue;
 
 import java.util.List;
 
+import org.opends.sdk.ldif.EntryReader;
 import org.opends.sdk.requests.Requests;
 import org.opends.sdk.responses.BindResult;
 import org.opends.sdk.responses.CompareResult;
 import org.opends.sdk.responses.Result;
-import org.opends.sdk.responses.SearchResultEntry;
 import org.testng.annotations.AfterClass;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
@@ -155,10 +155,11 @@
   public void testSearchRequest() throws Exception
   {
     final SynchronousConnection con = new SynchronousConnection(asyncCon);
-    final List<SearchResultEntry> entries = con.search(
+    final EntryReader reader = con.search(
         "uid=user.0,ou=people,o=test", SearchScope.BASE_OBJECT,
         "objectclass=*", "cn");
-    assertEquals(entries.size(), 1);
+    reader.readEntry();
+    assertNull(reader.readEntry());
   }
   // TODO: add more tests.
 }

--
Gitblit v1.10.0