You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ak...@apache.org on 2011/01/23 21:45:02 UTC
svn commit: r1062525 -
/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/model/cursor/ListCursorTest.java
Author: akarasulu
Date: Sun Jan 23 20:45:02 2011
New Revision: 1062525
URL: http://svn.apache.org/viewvc?rev=1062525&view=rev
Log:
fixed test - error during refactoring with Assert.
Modified:
directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/model/cursor/ListCursorTest.java
Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/model/cursor/ListCursorTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/model/cursor/ListCursorTest.java?rev=1062525&r1=1062524&r2=1062525&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/model/cursor/ListCursorTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/model/cursor/ListCursorTest.java Sun Jan 23 20:45:02 2011
@@ -70,11 +70,11 @@ public class ListCursorTest
{
cursor = new ListCursor<String>( Collections.singletonList( "singleton" ), 0 );
cursor.close();
- Assert.fail("when the start = end bounds this is senseless and should complain");
+ fail("when the start = end bounds this is senseless and should complain");
}
catch ( IllegalArgumentException e )
{
- Assert.assertNotNull(e);
+ assertNotNull(e);
}
// bad bounds: start = end is senseless
@@ -82,11 +82,11 @@ public class ListCursorTest
{
cursor = new ListCursor<String>( 1, Collections.singletonList( "singleton" ) );
cursor.close();
- Assert.fail("when the start = end bounds this is senseless and should complain");
+ fail("when the start = end bounds this is senseless and should complain");
}
catch ( IllegalArgumentException e )
{
- Assert.assertNotNull(e);
+ assertNotNull(e);
}
// bad bounds: start > end is senseless
@@ -94,11 +94,11 @@ public class ListCursorTest
{
cursor = new ListCursor<String>( 5, Collections.singletonList( "singleton" ) );
cursor.close();
- Assert.fail("when the start = end bounds this is senseless and should complain");
+ fail("when the start = end bounds this is senseless and should complain");
}
catch ( IllegalArgumentException e )
{
- Assert.assertNotNull(e);
+ assertNotNull(e);
}
// bad bounds: end < start is senseless too in another way :)
@@ -106,11 +106,11 @@ public class ListCursorTest
{
cursor = new ListCursor<String>( Collections.singletonList( "singleton" ), -5 );
cursor.close();
- Assert.fail("when the start = end bounds this is senseless and should complain");
+ fail("when the start = end bounds this is senseless and should complain");
}
catch ( IllegalArgumentException e )
{
- Assert.assertNotNull(e);
+ assertNotNull(e);
}
// bad bounds: start out of range
@@ -118,11 +118,11 @@ public class ListCursorTest
{
cursor = new ListCursor<String>( -5, Collections.singletonList( "singleton" ) );
cursor.close();
- Assert.fail("when the start = end bounds this is senseless and should complain");
+ fail("when the start = end bounds this is senseless and should complain");
}
catch ( IllegalArgumentException e )
{
- Assert.assertNotNull(e);
+ assertNotNull(e);
}
// bad bounds: end out of range
@@ -130,11 +130,11 @@ public class ListCursorTest
{
cursor = new ListCursor<String>( Collections.singletonList( "singleton" ), 5 );
cursor.close();
- Assert.fail("when the start = end bounds this is senseless and should complain");
+ fail("when the start = end bounds this is senseless and should complain");
}
catch ( IllegalArgumentException e )
{
- Assert.assertNotNull(e);
+ assertNotNull(e);
}
}
@@ -169,11 +169,11 @@ public class ListCursorTest
{
cursor = new ListCursor<String>( list, 0 );
cursor.close();
- Assert.fail("when the start = end bounds this is senseless and should complain");
+ fail("when the start = end bounds this is senseless and should complain");
}
catch ( IllegalArgumentException e )
{
- Assert.assertNotNull(e);
+ assertNotNull(e);
}
// bad bounds: start = end is senseless
@@ -181,11 +181,11 @@ public class ListCursorTest
{
cursor = new ListCursor<String>( 5, list );
cursor.close();
- Assert.fail("when the start = end bounds this is senseless and should complain");
+ fail("when the start = end bounds this is senseless and should complain");
}
catch ( IllegalArgumentException e )
{
- Assert.assertNotNull(e);
+ assertNotNull(e);
}
// bad bounds: start > end is senseless
@@ -193,11 +193,11 @@ public class ListCursorTest
{
cursor = new ListCursor<String>( 10, list );
cursor.close();
- Assert.fail("when the start = end bounds this is senseless and should complain");
+ fail("when the start = end bounds this is senseless and should complain");
}
catch ( IllegalArgumentException e )
{
- Assert.assertNotNull(e);
+ assertNotNull(e);
}
// bad bounds: end < start is senseless too in another way :)
@@ -205,11 +205,11 @@ public class ListCursorTest
{
cursor = new ListCursor<String>( list, -5 );
cursor.close();
- Assert.fail("when the start = end bounds this is senseless and should complain");
+ fail("when the start = end bounds this is senseless and should complain");
}
catch ( IllegalArgumentException e )
{
- Assert.assertNotNull(e);
+ assertNotNull(e);
}
// bad bounds: start out of range
@@ -217,11 +217,11 @@ public class ListCursorTest
{
cursor = new ListCursor<String>( -5, list );
cursor.close();
- Assert.fail("when the start = end bounds this is senseless and should complain");
+ fail("when the start = end bounds this is senseless and should complain");
}
catch ( IllegalArgumentException e )
{
- Assert.assertNotNull(e);
+ assertNotNull(e);
}
// bad bounds: end out of range
@@ -229,11 +229,11 @@ public class ListCursorTest
{
cursor = new ListCursor<String>( list, 10 );
cursor.close();
- Assert.fail("when the start = end bounds this is senseless and should complain");
+ fail("when the start = end bounds this is senseless and should complain");
}
catch ( IllegalArgumentException e )
{
- Assert.assertNotNull(e);
+ assertNotNull(e);
}
}
@@ -246,7 +246,7 @@ public class ListCursorTest
}
catch ( Exception e )
{
- Assert.fail("cursor.isClosed() test should not fail after closing the cursor");
+ fail("cursor.isClosed() test should not fail after closing the cursor");
}
try
@@ -255,78 +255,78 @@ public class ListCursorTest
}
catch ( Exception e )
{
- Assert.fail("cursor.close() after closing the cursor should not fail with exceptions");
+ fail("cursor.close() after closing the cursor should not fail with exceptions");
}
try
{
cursor.afterLast();
- Assert.fail("cursor.afterLast() after closing the cursor should fail with an IOException");
+ fail("cursor.afterLast() after closing the cursor should fail with an IOException");
}
catch ( Exception e )
{
- Assert.assertNotNull(e);
+ assertNotNull(e);
}
try
{
cursor.beforeFirst();
- Assert.fail("cursor.beforeFirst() after closing the cursor should fail with an IOException");
+ fail("cursor.beforeFirst() after closing the cursor should fail with an IOException");
}
catch ( Exception e )
{
- Assert.assertNotNull(e);
+ assertNotNull(e);
}
try
{
cursor.first();
- Assert.fail("cursor.first() after closing the cursor should fail with an IOException");
+ fail("cursor.first() after closing the cursor should fail with an IOException");
}
catch ( Exception e )
{
- Assert.assertNotNull(e);
+ assertNotNull(e);
}
try
{
cursor.get();
- Assert.fail("cursor.get() after closing the cursor should fail with an IOException");
+ fail("cursor.get() after closing the cursor should fail with an IOException");
}
catch ( Exception e )
{
- Assert.assertNotNull(e);
+ assertNotNull(e);
}
try
{
cursor.last();
- Assert.fail("cursor.last() after closing the cursor should fail with an IOException");
+ fail("cursor.last() after closing the cursor should fail with an IOException");
}
catch ( Exception e )
{
- Assert.assertNotNull(e);
+ assertNotNull(e);
}
try
{
cursor.next();
- Assert.fail("cursor.next() after closing the cursor should fail with an IOException");
+ fail("cursor.next() after closing the cursor should fail with an IOException");
}
catch ( Exception e )
{
- Assert.assertNotNull(e);
+ assertNotNull(e);
}
try
{
cursor.previous();
- Assert.fail("cursor.previous() after closing the cursor should fail with an IOException");
+ fail("cursor.previous() after closing the cursor should fail with an IOException");
}
catch ( Exception e )
{
- Assert.assertNotNull(e);
+ assertNotNull(e);
}
}
}