From 34ac48d938d5f3411505f7d0f883a585148ec716 Mon Sep 17 00:00:00 2001
From: matthew_swift <matthew_swift@localhost>
Date: Fri, 08 Jan 2010 18:13:58 +0000
Subject: [PATCH] * various minor code fixes * fix unit tests * remove TODOs from Javadoc (issues are now in Issue Tracker)
---
sdk/tests/unit-tests-testng/src/org/opends/sdk/LinkedAttributeTest.java | 25 ++++++++++++++-----------
1 files changed, 14 insertions(+), 11 deletions(-)
diff --git a/sdk/tests/unit-tests-testng/src/org/opends/sdk/LinkedAttributeTest.java b/sdk/tests/unit-tests-testng/src/org/opends/sdk/LinkedAttributeTest.java
index 834fc59..d4e53e9 100644
--- a/sdk/tests/unit-tests-testng/src/org/opends/sdk/LinkedAttributeTest.java
+++ b/sdk/tests/unit-tests-testng/src/org/opends/sdk/LinkedAttributeTest.java
@@ -30,6 +30,7 @@
import org.opends.sdk.schema.Schema;
+import org.testng.Assert;
import org.testng.annotations.Test;
import org.opends.sdk.ByteString;
@@ -54,18 +55,20 @@
attribute.add("a value");
attribute.add(ByteString.valueOf("another value"));
- System.out.println(attribute);
-
- System.out.println(attribute.contains(1));
- System.out.println(attribute.contains("a value"));
- System.out.println(attribute.contains(ByteString
+ Assert.assertTrue(attribute.contains(1));
+ Assert.assertTrue(attribute.contains("a value"));
+ Assert.assertTrue(attribute.contains(ByteString
.valueOf("another value")));
- attribute.remove(1);
- System.out.println(attribute);
- attribute.remove("a value");
- System.out.println(attribute);
- attribute.remove(ByteString.valueOf("another value"));
- System.out.println(attribute);
+ Assert.assertEquals(attribute.size(), 3);
+ Assert.assertTrue(attribute.remove(1));
+ Assert.assertEquals(attribute.size(), 2);
+ Assert.assertFalse(attribute.remove("a missing value"));
+ Assert.assertEquals(attribute.size(), 2);
+ Assert.assertTrue(attribute.remove("a value"));
+ Assert.assertEquals(attribute.size(), 1);
+ Assert.assertTrue(attribute.remove(ByteString
+ .valueOf("another value")));
+ Assert.assertEquals(attribute.size(), 0);
}
}
--
Gitblit v1.10.0