[Japi-cvs] SF.net SVN: japi: [547] libs/swing-list/trunk/src/test/net/sf/japi/swing/ list/ArrayLis
Status: Beta
Brought to you by:
christianhujer
|
From: <chr...@us...> - 2007-07-14 16:57:33
|
Revision: 547
http://svn.sourceforge.net/japi/?rev=547&view=rev
Author: christianhujer
Date: 2007-07-14 09:57:32 -0700 (Sat, 14 Jul 2007)
Log Message:
-----------
Added exception test cases.
Modified Paths:
--------------
libs/swing-list/trunk/src/test/net/sf/japi/swing/list/ArrayListModelTest.java
Modified: libs/swing-list/trunk/src/test/net/sf/japi/swing/list/ArrayListModelTest.java
===================================================================
--- libs/swing-list/trunk/src/test/net/sf/japi/swing/list/ArrayListModelTest.java 2007-07-14 16:57:14 UTC (rev 546)
+++ libs/swing-list/trunk/src/test/net/sf/japi/swing/list/ArrayListModelTest.java 2007-07-14 16:57:32 UTC (rev 547)
@@ -227,6 +227,46 @@
testling.removeListDataListener(listenerMock);
}
+ /** Tests that remove() with an uncontained element throws an IllegalArgumentException.
+ * @throws IllegalArgumentException (expected).
+ */
+ @Test(expected = IllegalArgumentException.class)
+ public void testRemoveIAE() {
+ new ArrayListModel<String>().remove("foo");
+ }
+
+ /** Tests that moveToTop() with an uncontained element throws an IllegalArgumentException.
+ * @throws IllegalArgumentException (expected).
+ */
+ @Test(expected = IllegalArgumentException.class)
+ public void testMoveToTopIAE() {
+ new ArrayListModel<String>().moveToTop("foo");
+ }
+
+ /** Tests that moveUp() with an uncontained element throws an IllegalArgumentException.
+ * @throws IllegalArgumentException (expected).
+ */
+ @Test(expected = IllegalArgumentException.class)
+ public void testMoveUpIAE() {
+ new ArrayListModel<String>().moveUp("foo");
+ }
+
+ /** Tests that moveDown() with an uncontained element throws an IllegalArgumentException.
+ * @throws IllegalArgumentException (expected).
+ */
+ @Test(expected = IllegalArgumentException.class)
+ public void testMoveDownIAE() {
+ new ArrayListModel<String>().moveDown("foo");
+ }
+
+ /** Tests that moveToBottom() with an uncontained element throws an IllegalArgumentException.
+ * @throws IllegalArgumentException (expected).
+ */
+ @Test(expected = IllegalArgumentException.class)
+ public void testMoveToBottomIAE() {
+ new ArrayListModel<String>().moveToBottom("foo");
+ }
+
/** Asserts a certain size and order after a move.
* @param message Message to issue in case the size and order are not as expected.
* @param model Testling to check.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|