Author: elecharny
Date: Fri Mar 13 16:21:21 2009
New Revision: 753312
URL: http://svn.apache.org/viewvc?rev=753312&view=rev
Log:
Switched to JUnit 4.4
Modified:
directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/AbstractMessageTest.java
directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/AbstractResultResponseTest.java
directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/AddRequestImplTest.java
directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/ArrayNamingEnumerationTest.java
directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/BindRequestImplTest.java
directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/BindResponseImplTest.java
directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/CompareRequestImplTest.java
directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/DeleteRequestImplTest.java
directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/ExtendedRequestImplTest.java
directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/ExtendedResponseImplTest.java
directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/LdapResultImplTest.java
directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyDnRequestImplTest.java
directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyRequestImplTest.java
directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/ReferralImplTest.java
directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseDoneImplTest.java
directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseEntryImplTest.java
directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseReferenceImplTest.java
Modified: directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/AbstractMessageTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/AbstractMessageTest.java?rev=753312&r1=753311&r2=753312&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/AbstractMessageTest.java (original)
+++ directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/AbstractMessageTest.java Fri Mar 13 16:21:21 2009
@@ -23,8 +23,9 @@
import org.apache.directory.shared.ldap.message.AbstractMessage;
import org.apache.directory.shared.ldap.message.MutableControl;
import org.apache.directory.shared.ldap.message.MessageTypeEnum;
-
-import junit.framework.TestCase;
+import org.junit.Test;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
/**
@@ -33,11 +34,12 @@
* @author <a href="mailto:dev@directory.apache.org"> Apache Directory Project</a>
* $Rev$
*/
-public class AbstractMessageTest extends TestCase
+public class AbstractMessageTest
{
/**
* Tests to see the same object returns true.
*/
+ @Test
public void testEqualsSameObj()
{
AbstractMessage msg;
@@ -52,6 +54,7 @@
/**
* Tests to see the same exact copy returns true.
*/
+ @Test
public void testEqualsExactCopy()
{
AbstractMessage msg0;
@@ -72,6 +75,7 @@
/**
* Tests to make sure changes in the id result in inequality.
*/
+ @Test
public void testNotEqualsDiffId()
{
AbstractMessage msg0;
@@ -92,6 +96,7 @@
/**
* Tests to make sure changes in the type result in inequality.
*/
+ @Test
public void testNotEqualsDiffType()
{
AbstractMessage msg0;
@@ -112,6 +117,7 @@
/**
* Tests to make sure changes in the controls result in inequality.
*/
+ @Test
public void testNotEqualsDiffControls()
{
AbstractMessage msg0;
Modified: directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/AbstractResultResponseTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/AbstractResultResponseTest.java?rev=753312&r1=753311&r2=753312&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/AbstractResultResponseTest.java (original)
+++ directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/AbstractResultResponseTest.java Fri Mar 13 16:21:21 2009
@@ -30,8 +30,9 @@
import org.apache.directory.shared.ldap.message.ReferralImpl;
import org.apache.directory.shared.ldap.message.ResultCodeEnum;
import org.apache.directory.shared.ldap.name.LdapDN;
-
-import junit.framework.TestCase;
+import org.junit.Test;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
/**
@@ -40,11 +41,12 @@
* @author <a href="mailto:dev@directory.apache.org"> Apache Directory Project</a>
* @version $Rev$
*/
-public class AbstractResultResponseTest extends TestCase
+public class AbstractResultResponseTest
{
/**
* Tests to see the same object returns true.
*/
+ @Test
public void testEqualsSameObj()
{
AbstractResultResponse msg;
@@ -59,6 +61,7 @@
/**
* Tests to see the same exact copy returns true.
*/
+ @Test
public void testEqualsExactCopy() throws InvalidNameException
{
AbstractResultResponse msg0 = new AbstractResultResponse( 5, MessageTypeEnum.BIND_REQUEST )
@@ -97,6 +100,7 @@
/**
* Tests to see the same exact copy returns true.
*/
+ @Test
public void testNotEqualsDiffResult() throws InvalidNameException
{
AbstractResultResponse msg0 = new AbstractResultResponse( 5, MessageTypeEnum.BIND_REQUEST )
@@ -135,6 +139,7 @@
/**
* Tests to make sure changes in the id result in inequality.
*/
+ @Test
public void testNotEqualsDiffId()
{
AbstractResultResponse msg0;
@@ -155,6 +160,7 @@
/**
* Tests to make sure changes in the type result in inequality.
*/
+ @Test
public void testNotEqualsDiffType()
{
AbstractResultResponse msg0;
@@ -175,6 +181,7 @@
/**
* Tests to make sure changes in the controls result in inequality.
*/
+ @Test
public void testNotEqualsDiffControls()
{
AbstractResultResponse msg0;
Modified: directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/AddRequestImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/AddRequestImplTest.java?rev=753312&r1=753311&r2=753312&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/AddRequestImplTest.java (original)
+++ directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/AddRequestImplTest.java Fri Mar 13 16:21:21 2009
@@ -20,8 +20,6 @@
package org.apache.directory.shared.ldap.message;
-import junit.framework.TestCase;
-
import java.util.HashMap;
import java.util.Map;
@@ -41,6 +39,9 @@
import org.apache.directory.shared.ldap.message.MessageTypeEnum;
import org.apache.directory.shared.ldap.message.ResultResponse;
import org.apache.directory.shared.ldap.name.LdapDN;
+import org.junit.Test;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
/**
@@ -49,7 +50,7 @@
* @author <a href="mailto:dev@directory.apache.org"> Apache Directory Project</a>
* @version $Rev$
*/
-public class AddRequestImplTest extends TestCase
+public class AddRequestImplTest
{
private static final Map<String, Control> EMPTY_CONTROL_MAP = new HashMap<String, Control>();
@@ -97,6 +98,7 @@
/**
* Tests the same object referrence for equality.
*/
+ @Test
public void testEqualsSameObj()
{
AddRequestImpl req = new AddRequestImpl( 5 );
@@ -107,6 +109,7 @@
/**
* Tests for equality using exact copies.
*/
+ @Test
public void testEqualsExactCopy() throws InvalidNameException, NamingException
{
AddRequestImpl req0 = new AddRequestImpl( 5 );
@@ -124,6 +127,7 @@
/**
* Test for inequality when only the IDs are different.
*/
+ @Test
public void testNotEqualDiffId() throws InvalidNameException, NamingException
{
AddRequestImpl req0 = new AddRequestImpl( 7 );
@@ -141,6 +145,7 @@
/**
* Test for inequality when only the DN names are different.
*/
+ @Test
public void testNotEqualDiffName() throws InvalidNameException, NamingException
{
AddRequestImpl req0 = new AddRequestImpl( 5 );
@@ -158,6 +163,7 @@
/**
* Test for inequality when only the DN names are different.
*/
+ @Test
public void testNotEqualDiffAttributes() throws InvalidNameException, NamingException
{
AddRequestImpl req0 = new AddRequestImpl( 5 );
@@ -185,6 +191,7 @@
/**
* Tests for equality even when another BindRequest implementation is used.
*/
+ @Test
public void testEqualsDiffImpl()
{
AddRequest req0 = new AddRequest()
Modified: directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/ArrayNamingEnumerationTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/ArrayNamingEnumerationTest.java?rev=753312&r1=753311&r2=753312&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/ArrayNamingEnumerationTest.java (original)
+++ directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/ArrayNamingEnumerationTest.java Fri Mar 13 16:21:21 2009
@@ -22,10 +22,14 @@
import java.util.NoSuchElementException;
-import junit.framework.TestCase;
-
import org.apache.directory.shared.ldap.message.ArrayNamingEnumeration;
import org.apache.directory.shared.ldap.util.ArrayUtils;
+import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.fail;
/**
@@ -34,11 +38,12 @@
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
* @version $Rev$
*/
-public class ArrayNamingEnumerationTest extends TestCase
+public class ArrayNamingEnumerationTest
{
/**
* Tests ArrayNamingEnumeration using an null array.
*/
+ @Test
public void testUsingNullArray()
{
ArrayNamingEnumeration<Object> list = new ArrayNamingEnumeration<Object>( null );
@@ -59,6 +64,7 @@
/**
* Tests ArrayNamingEnumeration using an array with length = 0.
*/
+ @Test
public void testUsingEmptyArray()
{
ArrayNamingEnumeration<String> list = new ArrayNamingEnumeration<String>( ArrayUtils.EMPTY_STRING_ARRAY );
@@ -79,6 +85,7 @@
/**
* Tests ArrayNamingEnumeration using an array with length = 1.
*/
+ @Test
public void testUsingSingleElementArray()
{
ArrayNamingEnumeration<String> list = new ArrayNamingEnumeration<String>( new String[]
@@ -101,6 +108,7 @@
/**
* Tests ArrayNamingEnumeration using an array with length = 2.
*/
+ @Test
public void testUsingTwoElementArray()
{
ArrayNamingEnumeration<String> list = new ArrayNamingEnumeration<String>( new String[]
Modified: directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/BindRequestImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/BindRequestImplTest.java?rev=753312&r1=753311&r2=753312&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/BindRequestImplTest.java (original)
+++ directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/BindRequestImplTest.java Fri Mar 13 16:21:21 2009
@@ -20,8 +20,6 @@
package org.apache.directory.shared.ldap.message;
-import junit.framework.TestCase;
-
import java.util.HashMap;
import java.util.Map;
@@ -34,6 +32,9 @@
import org.apache.directory.shared.ldap.message.MessageTypeEnum;
import org.apache.directory.shared.ldap.message.ResultResponse;
import org.apache.directory.shared.ldap.name.LdapDN;
+import org.junit.Test;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
/**
@@ -42,13 +43,14 @@
* @author <a href="mailto:dev@directory.apache.org"> Apache Directory Project</a>
* $Rev$
*/
-public class BindRequestImplTest extends TestCase
+public class BindRequestImplTest
{
private static final Map<String, Control> EMPTY_CONTROL_MAP = new HashMap<String, Control>();
/**
* Tests the same object referrence for equality.
*/
+ @Test
public void testEqualsSameObj()
{
BindRequestImpl req = new BindRequestImpl( 5 );
@@ -59,6 +61,7 @@
/**
* Tests for equality using exact copies.
*/
+ @Test
public void testEqualsExactCopy() throws InvalidNameException
{
BindRequestImpl req0 = new BindRequestImpl( 5 );
@@ -80,6 +83,7 @@
/**
* Test for inequality when only the IDs are different.
*/
+ @Test
public void testNotEqualDiffId() throws InvalidNameException
{
BindRequestImpl req0 = new BindRequestImpl( 7 );
@@ -101,6 +105,7 @@
/**
* Test for inequality when only the credentials are different.
*/
+ @Test
public void testNotEqualDiffCreds() throws InvalidNameException
{
BindRequestImpl req0 = new BindRequestImpl( 5 );
@@ -122,6 +127,7 @@
/**
* Test for inequality when only the DN names are different.
*/
+ @Test
public void testNotEqualDiffName() throws InvalidNameException
{
BindRequestImpl req0 = new BindRequestImpl( 5 );
@@ -143,6 +149,7 @@
/**
* Test for inequality when only the auth mechanisms are different.
*/
+ @Test
public void testNotEqualDiffSimple() throws InvalidNameException
{
BindRequestImpl req0 = new BindRequestImpl( 5 );
@@ -164,6 +171,7 @@
/**
* Test for inequality when only the bind LDAP versions are different.
*/
+ @Test
public void testNotEqualDiffVersion() throws InvalidNameException
{
BindRequestImpl req0 = new BindRequestImpl( 5 );
@@ -185,6 +193,7 @@
/**
* Tests for equality even when another BindRequest implementation is used.
*/
+ @Test
public void testEqualsDiffImpl()
{
BindRequest req0 = new BindRequest()
Modified: directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/BindResponseImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/BindResponseImplTest.java?rev=753312&r1=753311&r2=753312&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/BindResponseImplTest.java (original)
+++ directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/BindResponseImplTest.java Fri Mar 13 16:21:21 2009
@@ -28,8 +28,9 @@
import org.apache.directory.shared.ldap.message.ReferralImpl;
import org.apache.directory.shared.ldap.message.ResultCodeEnum;
import org.apache.directory.shared.ldap.name.LdapDN;
-
-import junit.framework.TestCase;
+import org.junit.Test;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
/**
@@ -38,12 +39,13 @@
* @author <a href="mailto:dev@directory.apache.org"> Apache Directory Project</a>
* $Rev$
*/
-public class BindResponseImplTest extends TestCase
+public class BindResponseImplTest
{
/**
* Tests to make sure the same object returns true with equals().
*/
+ @Test
public void testEqualsSameObj()
{
BindResponseImpl resp = new BindResponseImpl( 1 );
@@ -54,6 +56,7 @@
/**
* Tests to make sure newly created objects with same id are equal.
*/
+ @Test
public void testEqualsNewWithSameId()
{
BindResponseImpl resp0 = new BindResponseImpl( 1 );
@@ -67,6 +70,7 @@
* Tests to make sure newly created objects with same different id are not
* equal.
*/
+ @Test
public void testNotEqualsNewWithDiffId()
{
BindResponseImpl resp0 = new BindResponseImpl( 1 );
@@ -80,6 +84,7 @@
* Tests to make sure newly created objects with same different saslCreds
* are not equal.
*/
+ @Test
public void testNotEqualsNewWithDiffSaslCreds()
{
BindResponseImpl resp0 = new BindResponseImpl( 1 );
@@ -94,6 +99,7 @@
/**
* Tests for equality of two fully loaded identical BindResponse PDUs.
*/
+ @Test
public void testEqualsWithTheWorks() throws InvalidNameException
{
LdapResultImpl r0 = new LdapResultImpl();
Modified: directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/CompareRequestImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/CompareRequestImplTest.java?rev=753312&r1=753311&r2=753312&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/CompareRequestImplTest.java (original)
+++ directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/CompareRequestImplTest.java Fri Mar 13 16:21:21 2009
@@ -20,8 +20,6 @@
package org.apache.directory.shared.ldap.message;
-import junit.framework.TestCase;
-
import java.util.HashMap;
import java.util.Map;
@@ -36,6 +34,9 @@
import org.apache.directory.shared.ldap.message.MessageTypeEnum;
import org.apache.directory.shared.ldap.message.ResultResponse;
import org.apache.directory.shared.ldap.name.LdapDN;
+import org.junit.Test;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
/**
@@ -44,13 +45,14 @@
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
* @version $Rev$
*/
-public class CompareRequestImplTest extends TestCase
+public class CompareRequestImplTest
{
private static final Map<String, Control> EMPTY_CONTROL_MAP = new HashMap<String, Control>();
/**
* Tests the same object referrence for equality.
*/
+ @Test
public void testEqualsSameObj()
{
CompareRequestImpl req = new CompareRequestImpl( 5 );
@@ -61,6 +63,7 @@
/**
* Tests for equality using exact copies.
*/
+ @Test
public void testEqualsExactCopy() throws InvalidNameException
{
CompareRequestImpl req0 = new CompareRequestImpl( 5 );
@@ -81,6 +84,7 @@
/**
* Test for inequality when only the IDs are different.
*/
+ @Test
public void testNotEqualDiffId() throws InvalidNameException
{
CompareRequestImpl req0 = new CompareRequestImpl( 7 );
@@ -97,6 +101,7 @@
/**
* Test for inequality when only the attributeIds are different.
*/
+ @Test
public void testNotEqualDiffAttributeIds() throws InvalidNameException
{
CompareRequestImpl req0 = new CompareRequestImpl( 5 );
@@ -117,6 +122,7 @@
/**
* Test for inequality when only the Assertion values are different.
*/
+ @Test
public void testNotEqualDiffValue() throws InvalidNameException
{
CompareRequestImpl req0 = new CompareRequestImpl( 5 );
@@ -138,6 +144,7 @@
* Tests for equality even when another CompareRequest implementation is
* used.
*/
+ @Test
public void testEqualsDiffImpl()
{
CompareRequest req0 = new CompareRequest()
Modified: directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/DeleteRequestImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/DeleteRequestImplTest.java?rev=753312&r1=753311&r2=753312&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/DeleteRequestImplTest.java (original)
+++ directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/DeleteRequestImplTest.java Fri Mar 13 16:21:21 2009
@@ -20,8 +20,6 @@
package org.apache.directory.shared.ldap.message;
-import junit.framework.TestCase;
-
import java.util.HashMap;
import java.util.Map;
@@ -35,6 +33,9 @@
import org.apache.directory.shared.ldap.message.MessageTypeEnum;
import org.apache.directory.shared.ldap.message.ResultResponse;
import org.apache.directory.shared.ldap.name.LdapDN;
+import org.junit.Test;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
/**
@@ -43,13 +44,14 @@
* @author <a href="mailto:dev@directory.apache.org"> Apache Directory Project</a>
* @version $Rev$
*/
-public class DeleteRequestImplTest extends TestCase
+public class DeleteRequestImplTest
{
private static final Map<String, Control> EMPTY_CONTROL_MAP = new HashMap<String, Control>();
/**
* Tests the same object referrence for equality.
*/
+ @Test
public void testEqualsSameObj()
{
DeleteRequestImpl req = new DeleteRequestImpl( 5 );
@@ -60,6 +62,7 @@
/**
* Tests for equality using exact copies.
*/
+ @Test
public void testEqualsExactCopy() throws InvalidNameException
{
DeleteRequestImpl req0 = new DeleteRequestImpl( 5 );
@@ -75,6 +78,7 @@
/**
* Test for inequality when only the IDs are different.
*/
+ @Test
public void testNotEqualDiffId() throws InvalidNameException
{
DeleteRequestImpl req0 = new DeleteRequestImpl( 7 );
@@ -90,6 +94,7 @@
/**
* Test for inequality when only the DN names are different.
*/
+ @Test
public void testNotEqualDiffName() throws InvalidNameException
{
DeleteRequestImpl req0 = new DeleteRequestImpl( 5 );
@@ -106,6 +111,7 @@
* Tests for equality even when another DeleteRequest implementation is
* used.
*/
+ @Test
public void testEqualsDiffImpl()
{
DeleteRequest req0 = new DeleteRequest()
Modified: directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/ExtendedRequestImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/ExtendedRequestImplTest.java?rev=753312&r1=753311&r2=753312&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/ExtendedRequestImplTest.java (original)
+++ directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/ExtendedRequestImplTest.java Fri Mar 13 16:21:21 2009
@@ -20,8 +20,6 @@
package org.apache.directory.shared.ldap.message;
-import junit.framework.TestCase;
-
import java.util.HashMap;
import java.util.Map;
@@ -34,6 +32,9 @@
import org.apache.directory.shared.ldap.message.MessageException;
import org.apache.directory.shared.ldap.message.MessageTypeEnum;
import org.apache.directory.shared.ldap.message.ResultResponse;
+import org.junit.Test;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
/**
@@ -42,13 +43,14 @@
* @author <a href="mailto:dev@directory.apache.org"> Apache Directory Project</a>
* @version $Rev$
*/
-public class ExtendedRequestImplTest extends TestCase
+public class ExtendedRequestImplTest
{
private static final Map<String, Control> EMPTY_CONTROL_MAP = new HashMap<String, Control>();
/**
* Tests the same object referrence for equality.
*/
+ @Test
public void testEqualsSameObj()
{
ExtendedRequestImpl req = new ExtendedRequestImpl( 5 );
@@ -59,6 +61,7 @@
/**
* Tests for equality using exact copies.
*/
+ @Test
public void testEqualsExactCopy()
{
ExtendedRequestImpl req0 = new ExtendedRequestImpl( 5 );
@@ -77,6 +80,7 @@
/**
* Test for inequality when only the IDs are different.
*/
+ @Test
public void testNotEqualDiffId()
{
ExtendedRequestImpl req0 = new ExtendedRequestImpl( 7 );
@@ -90,6 +94,7 @@
/**
* Test for inequality when only the OID is different.
*/
+ @Test
public void testNotEqualDiffOID()
{
ExtendedRequestImpl req0 = new ExtendedRequestImpl( 5 );
@@ -108,6 +113,7 @@
/**
* Test for inequality when only the Assertion values are different.
*/
+ @Test
public void testNotEqualDiffValue()
{
ExtendedRequestImpl req0 = new ExtendedRequestImpl( 5 );
@@ -127,6 +133,7 @@
* Tests for equality even when another ExtendedRequest implementation is
* used.
*/
+ @Test
public void testEqualsDiffImpl()
{
ExtendedRequest req0 = new ExtendedRequest()
Modified: directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/ExtendedResponseImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/ExtendedResponseImplTest.java?rev=753312&r1=753311&r2=753312&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/ExtendedResponseImplTest.java (original)
+++ directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/ExtendedResponseImplTest.java Fri Mar 13 16:21:21 2009
@@ -20,8 +20,6 @@
package org.apache.directory.shared.ldap.message;
-import junit.framework.TestCase;
-
import java.util.HashMap;
import java.util.Map;
@@ -37,6 +35,9 @@
import org.apache.directory.shared.ldap.message.ReferralImpl;
import org.apache.directory.shared.ldap.message.ResultCodeEnum;
import org.apache.directory.shared.ldap.name.LdapDN;
+import org.junit.Test;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
/**
@@ -45,7 +46,7 @@
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
* @version $Rev$
*/
-public class ExtendedResponseImplTest extends TestCase
+public class ExtendedResponseImplTest
{
private static final Map<String, Control> EMPTY_CONTROL_MAP = new HashMap<String, Control>();
@@ -84,6 +85,7 @@
/**
* Tests for equality using the same object.
*/
+ @Test
public void testEqualsSameObj()
{
ExtendedResponseImpl resp = createStub();
@@ -94,6 +96,7 @@
/**
* Tests for equality using an exact copy.
*/
+ @Test
public void testEqualsExactCopy()
{
ExtendedResponseImpl resp0 = createStub();
@@ -106,6 +109,7 @@
/**
* Tests for equality using different stub implementations.
*/
+ @Test
public void testEqualsDiffImpl()
{
ExtendedResponseImpl resp0 = createStub();
@@ -231,6 +235,7 @@
/**
* Tests inequality when messageIds are different.
*/
+ @Test
public void testNotEqualsDiffIds()
{
ExtendedResponseImpl resp0 = new ExtendedResponseImpl( 3 );
@@ -244,6 +249,7 @@
/**
* Tests inequality when responseNames are different.
*/
+ @Test
public void testNotEqualsDiffNames()
{
ExtendedResponseImpl resp0 = createStub();
@@ -259,6 +265,7 @@
/**
* Tests inequality when responses are different.
*/
+ @Test
public void testNotEqualsDiffResponses()
{
ExtendedResponseImpl resp0 = createStub();
Modified: directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/LdapResultImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/LdapResultImplTest.java?rev=753312&r1=753311&r2=753312&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/LdapResultImplTest.java (original)
+++ directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/LdapResultImplTest.java Fri Mar 13 16:21:21 2009
@@ -28,8 +28,9 @@
import org.apache.directory.shared.ldap.message.ReferralImpl;
import org.apache.directory.shared.ldap.message.ResultCodeEnum;
import org.apache.directory.shared.ldap.name.LdapDN;
-
-import junit.framework.TestCase;
+import org.junit.Test;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
/**
@@ -38,11 +39,12 @@
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
* $Rev$
*/
-public class LdapResultImplTest extends TestCase
+public class LdapResultImplTest
{
/**
* Tests to make sure the two same objects are seen as equal.
*/
+ @Test
public void testEqualsSameObj()
{
LdapResultImpl r0 = new LdapResultImpl();
@@ -54,6 +56,7 @@
* Tests to make sure a default LdapResultImpl equals another one just
* created.
*/
+ @Test
public void testEqualsDefaultCopy()
{
LdapResultImpl r0 = new LdapResultImpl();
@@ -67,6 +70,7 @@
/**
* Tests for equality when the lockable parent is not the same.
*/
+ @Test
public void testEqualsDiffLockableParent()
{
LdapResultImpl r0 = new LdapResultImpl();
@@ -80,6 +84,7 @@
/**
* Tests for equality when the lockable parent is the same.
*/
+ @Test
public void testEqualsDiffImpl()
{
LdapResultImpl r0 = new LdapResultImpl();
@@ -143,6 +148,7 @@
/**
* Tests two non default carbon copies for equality.
*/
+ @Test
public void testEqualsCarbonCopy() throws InvalidNameException
{
LdapResultImpl r0 = new LdapResultImpl();
@@ -173,6 +179,7 @@
/**
* Tests for inequality when the error message is different.
*/
+ @Test
public void testNotEqualsDiffErrorMessage() throws InvalidNameException
{
LdapResultImpl r0 = new LdapResultImpl();
@@ -203,6 +210,7 @@
/**
* Tests for inequality when the matchedDn properties are not the same.
*/
+ @Test
public void testNotEqualsDiffMatchedDn() throws InvalidNameException
{
LdapResultImpl r0 = new LdapResultImpl();
@@ -233,6 +241,7 @@
/**
* Tests for inequality when the resultCode properties are not the same.
*/
+ @Test
public void testNotEqualsDiffResultCode() throws InvalidNameException
{
LdapResultImpl r0 = new LdapResultImpl();
@@ -263,6 +272,7 @@
/**
* Tests for inequality when the referrals are not the same.
*/
+ @Test
public void testNotEqualsDiffReferrals() throws InvalidNameException
{
LdapResultImpl r0 = new LdapResultImpl();
Modified: directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyDnRequestImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyDnRequestImplTest.java?rev=753312&r1=753311&r2=753312&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyDnRequestImplTest.java (original)
+++ directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyDnRequestImplTest.java Fri Mar 13 16:21:21 2009
@@ -20,8 +20,6 @@
package org.apache.directory.shared.ldap.message;
-import junit.framework.TestCase;
-
import java.util.HashMap;
import java.util.Map;
@@ -36,6 +34,9 @@
import org.apache.directory.shared.ldap.message.ResultResponse;
import org.apache.directory.shared.ldap.name.LdapDN;
import org.apache.directory.shared.ldap.name.Rdn;
+import org.junit.Test;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
/**
@@ -44,7 +45,7 @@
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
* @version $Rev$
*/
-public class ModifyDnRequestImplTest extends TestCase
+public class ModifyDnRequestImplTest
{
private static final Map<String, Control> EMPTY_CONTROL_MAP = new HashMap<String, Control>();
@@ -53,7 +54,7 @@
*
* @return the request
*/
- public ModifyDnRequestImpl getRequest()
+ private ModifyDnRequestImpl getRequest()
{
// Construct the ModifyDn request to test
ModifyDnRequestImpl request = new ModifyDnRequestImpl( 45 );
@@ -77,6 +78,7 @@
/**
* Tests the same object referrence for equality.
*/
+ @Test
public void testEqualsSameObj()
{
ModifyDnRequestImpl req = new ModifyDnRequestImpl( 5 );
@@ -87,6 +89,7 @@
/**
* Tests for equality using exact copies.
*/
+ @Test
public void testEqualsExactCopy0()
{
ModifyDnRequestImpl req0 = getRequest();
@@ -99,6 +102,7 @@
/**
* Tests for equality using exact copies.
*/
+ @Test
public void testEqualsExactCopy1()
{
ModifyDnRequestImpl req0 = getRequest();
@@ -113,6 +117,7 @@
/**
* Test for inequality when only the IDs are different.
*/
+ @Test
public void testNotEqualDiffId()
{
ModifyDnRequestImpl req0 = new ModifyDnRequestImpl( 4 );
@@ -125,6 +130,7 @@
/**
* Test for inequality when only the DN names are different.
*/
+ @Test
public void testNotEqualDiffName() throws InvalidNameException
{
ModifyDnRequestImpl req0 = getRequest();
@@ -140,6 +146,7 @@
/**
* Test for inequality when only the newSuperior DNs are different.
*/
+ @Test
public void testNotEqualDiffNewSuperior() throws InvalidNameException
{
ModifyDnRequestImpl req0 = getRequest();
@@ -155,6 +162,7 @@
/**
* Test for inequality when only the delete old Rdn properties is different.
*/
+ @Test
public void testNotEqualDiffDeleteOldRdn()
{
ModifyDnRequestImpl req0 = getRequest();
@@ -170,6 +178,7 @@
/**
* Test for inequality when only the new Rdn properties are different.
*/
+ @Test
public void testNotEqualDiffNewRdn() throws InvalidNameException
{
ModifyDnRequestImpl req0 = getRequest();
@@ -186,6 +195,7 @@
/**
* Tests for equality even when another BindRequest implementation is used.
*/
+ @Test
public void testEqualsDiffImpl()
{
ModifyDnRequest req0 = new ModifyDnRequest()
Modified: directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyRequestImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyRequestImplTest.java?rev=753312&r1=753311&r2=753312&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyRequestImplTest.java (original)
+++ directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyRequestImplTest.java Fri Mar 13 16:21:21 2009
@@ -20,8 +20,6 @@
package org.apache.directory.shared.ldap.message;
-import junit.framework.TestCase;
-
import javax.naming.InvalidNameException;
import javax.naming.ldap.Control;
@@ -37,6 +35,9 @@
import org.apache.directory.shared.ldap.message.ModifyRequestImpl;
import org.apache.directory.shared.ldap.message.ResultResponse;
import org.apache.directory.shared.ldap.name.LdapDN;
+import org.junit.Test;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
import java.util.Collection;
import java.util.ArrayList;
@@ -51,7 +52,7 @@
* @author <a href="mailto:dev@directory.apache.org"> Apache Directory Project</a>
* @version $Rev$
*/
-public class ModifyRequestImplTest extends TestCase
+public class ModifyRequestImplTest
{
private static final Map<String, Control> EMPTY_CONTROL_MAP = new HashMap<String, Control>();
@@ -60,7 +61,7 @@
*
* @return the ModifyRequest to use for tests
*/
- public ModifyRequestImpl getRequest()
+ private ModifyRequestImpl getRequest()
{
// Construct the Modify request to test
ModifyRequestImpl req = new ModifyRequestImpl( 45 );
@@ -99,6 +100,7 @@
/**
* Tests the same object referrence for equality.
*/
+ @Test
public void testEqualsSameObj()
{
ModifyRequestImpl req = getRequest();
@@ -109,6 +111,7 @@
/**
* Tests for equality using exact copies.
*/
+ @Test
public void testEqualsExactCopy()
{
ModifyRequestImpl req0 = getRequest();
@@ -120,6 +123,7 @@
/**
* Test for inequality when only the IDs are different.
*/
+ @Test
public void testNotEqualDiffId()
{
ModifyRequestImpl req0 = new ModifyRequestImpl( 7 );
@@ -131,6 +135,7 @@
/**
* Test for inequality when only the DN names are different.
*/
+ @Test
public void testNotEqualDiffName()
{
try
@@ -152,6 +157,7 @@
/**
* Test for inequality when only the mods ops are different.
*/
+ @Test
public void testNotEqualDiffModOps()
{
ModifyRequestImpl req0 = getRequest();
@@ -178,6 +184,7 @@
/**
* Test for inequality when only the number of mods are different.
*/
+ @Test
public void testNotEqualDiffModCount()
{
ModifyRequestImpl req0 = getRequest();
@@ -198,6 +205,7 @@
/**
* Test for inequality when only the mods attribute Id's are different.
*/
+ @Test
public void testNotEqualDiffModIds()
{
ModifyRequestImpl req0 = getRequest();
@@ -224,6 +232,7 @@
/**
* Test for inequality when only the mods attribute values are different.
*/
+ @Test
public void testNotEqualDiffModValues()
{
ModifyRequestImpl req0 = getRequest();
@@ -251,6 +260,7 @@
/**
* Tests for equality even when another BindRequest implementation is used.
*/
+ @Test
public void testEqualsDiffImpl()
{
ModifyRequest req0 = new ModifyRequest()
Modified: directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/ReferralImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/ReferralImplTest.java?rev=753312&r1=753311&r2=753312&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/ReferralImplTest.java (original)
+++ directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/ReferralImplTest.java Fri Mar 13 16:21:21 2009
@@ -20,13 +20,14 @@
package org.apache.directory.shared.ldap.message;
-import junit.framework.TestCase;
-
import java.util.Collection;
import java.util.Collections;
import org.apache.directory.shared.ldap.message.Referral;
import org.apache.directory.shared.ldap.message.ReferralImpl;
+import org.junit.Test;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
/**
@@ -35,11 +36,12 @@
* @author <a href="mailto:dev@directory.apache.org"> Apache Directory Project</a>
* $Rev$
*/
-public class ReferralImplTest extends TestCase
+public class ReferralImplTest
{
/**
* Tests to make sure the equals method works for the same exact object.
*/
+ @Test
public void testEqualsSameObject()
{
ReferralImpl refs = new ReferralImpl();
@@ -51,6 +53,7 @@
* Tests to make sure the equals method works for two objects that are the
* same exact copy of one another.
*/
+ @Test
public void testEqualsExactCopy()
{
ReferralImpl refs0 = new ReferralImpl();
@@ -70,6 +73,7 @@
* Tests to make sure the equals method works for two objects that are the
* same exact copy of one another but there are redundant entries.
*/
+ @Test
public void testEqualsExactCopyWithRedundancy()
{
ReferralImpl refs0 = new ReferralImpl();
@@ -91,6 +95,7 @@
* Tests to make sure the equals method works for two objects that are the
* not exact copies of one another but have the same number of URLs.
*/
+ @Test
public void testEqualsSameNumberButDifferentUrls()
{
ReferralImpl refs0 = new ReferralImpl();
@@ -113,6 +118,7 @@
* not exact copies of one another and one has a subset of the urls of the
* other.
*/
+ @Test
public void testEqualsSubset()
{
ReferralImpl refs0 = new ReferralImpl();
@@ -128,6 +134,7 @@
}
+ @Test
public void testEqualsDifferentImpls()
{
Referral refs0 = new Referral()
Modified: directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseDoneImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseDoneImplTest.java?rev=753312&r1=753311&r2=753312&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseDoneImplTest.java (original)
+++ directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseDoneImplTest.java Fri Mar 13 16:21:21 2009
@@ -20,8 +20,6 @@
package org.apache.directory.shared.ldap.message;
-import junit.framework.TestCase;
-
import java.util.HashMap;
import java.util.Map;
@@ -37,6 +35,9 @@
import org.apache.directory.shared.ldap.message.SearchResponseDone;
import org.apache.directory.shared.ldap.message.SearchResponseDoneImpl;
import org.apache.directory.shared.ldap.name.LdapDN;
+import org.junit.Test;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
/**
@@ -45,7 +46,7 @@
* @author <a href="mailto:dev@directory.apache.org"> Apache Directory Project</a>
* $Rev$
*/
-public class SearchResponseDoneImplTest extends TestCase
+public class SearchResponseDoneImplTest
{
private static final Map<String, Control> EMPTY_CONTROL_MAP = new HashMap<String, Control>();
@@ -82,6 +83,7 @@
/**
* Tests for equality using the same object.
*/
+ @Test
public void testEqualsSameObj()
{
SearchResponseDoneImpl resp = createStub();
@@ -92,6 +94,7 @@
/**
* Tests for equality using an exact copy.
*/
+ @Test
public void testEqualsExactCopy()
{
SearchResponseDoneImpl resp0 = createStub();
@@ -104,6 +107,7 @@
/**
* Tests for equality using different stub implementations.
*/
+ @Test
public void testEqualsDiffImpl()
{
SearchResponseDoneImpl resp0 = createStub();
@@ -191,6 +195,7 @@
/**
* Tests inequality when messageIds are different.
*/
+ @Test
public void testNotEqualsDiffIds()
{
SearchResponseDoneImpl resp0 = new SearchResponseDoneImpl( 3 );
Modified: directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseEntryImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseEntryImplTest.java?rev=753312&r1=753311&r2=753312&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseEntryImplTest.java (original)
+++ directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseEntryImplTest.java Fri Mar 13 16:21:21 2009
@@ -20,14 +20,8 @@
package org.apache.directory.shared.ldap.message;
-import junit.framework.TestCase;
-
-import java.util.HashMap;
-import java.util.Map;
-
import javax.naming.InvalidNameException;
import javax.naming.NamingException;
-import javax.naming.ldap.Control;
import org.apache.directory.shared.ldap.entry.Entry;
import org.apache.directory.shared.ldap.entry.EntryAttribute;
@@ -35,6 +29,9 @@
import org.apache.directory.shared.ldap.entry.client.DefaultClientEntry;
import org.apache.directory.shared.ldap.message.SearchResponseEntryImpl;
import org.apache.directory.shared.ldap.name.LdapDN;
+import org.junit.Test;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
/**
@@ -43,10 +40,8 @@
* @author <a href="mailto:dev@directory.apache.org"> Apache Directory Project</a>
* $Rev$
*/
-public class SearchResponseEntryImplTest extends TestCase
+public class SearchResponseEntryImplTest
{
- private static final Map<String, Control> EMPTY_CONTROL_MAP = new HashMap<String, Control>();
-
/**
* Creates and populates an EntryAttribute with a specific id.
*
@@ -68,7 +63,7 @@
*
* @return The populated Entry object
*/
- Entry getEntry() throws NamingException
+ private Entry getEntry() throws NamingException
{
Entry attrs = new DefaultClientEntry();
attrs.put( getEntry( "attr0" ) );
@@ -81,6 +76,7 @@
/**
* Tests for equality when the same object referrence is used.
*/
+ @Test
public void testEqualsSameObject()
{
SearchResponseEntryImpl resp = new SearchResponseEntryImpl( 5 );
@@ -91,6 +87,7 @@
/**
* Tests for equality when an exact copy is compared.
*/
+ @Test
public void testEqualsExactCopy() throws InvalidNameException, NamingException
{
SearchResponseEntryImpl resp0 = new SearchResponseEntryImpl( 5 );
@@ -109,6 +106,7 @@
/**
* Tests for inequality when the objectName dn is not the same.
*/
+ @Test
public void testNotEqualDiffObjectName() throws InvalidNameException, NamingException
{
SearchResponseEntryImpl resp0 = new SearchResponseEntryImpl( 5 );
@@ -127,6 +125,7 @@
/**
* Tests for inequality when the attributes are not the same.
*/
+ @Test
public void testNotEqualDiffAttributes() throws InvalidNameException, NamingException
{
SearchResponseEntryImpl resp0 = new SearchResponseEntryImpl( 5 );
Modified: directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseReferenceImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseReferenceImplTest.java?rev=753312&r1=753311&r2=753312&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseReferenceImplTest.java (original)
+++ directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseReferenceImplTest.java Fri Mar 13 16:21:21 2009
@@ -20,8 +20,6 @@
package org.apache.directory.shared.ldap.message;
-import junit.framework.TestCase;
-
import java.util.HashMap;
import java.util.Map;
@@ -33,6 +31,9 @@
import org.apache.directory.shared.ldap.message.ReferralImpl;
import org.apache.directory.shared.ldap.message.SearchResponseReference;
import org.apache.directory.shared.ldap.message.SearchResponseReferenceImpl;
+import org.junit.Test;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
/**
@@ -41,7 +42,7 @@
* @author <a href="mailto:dev@directory.apache.org"> Apache Directory Project</a>
* @version $Rev$
*/
-public class SearchResponseReferenceImplTest extends TestCase
+public class SearchResponseReferenceImplTest
{
private static final Map<String, Control> EMPTY_CONTROL_MAP = new HashMap<String, Control>();
@@ -53,7 +54,7 @@
* the parent lockable
* @return the newly created referral for testing
*/
- public Referral getReferral( SearchResponseReference resp )
+ private Referral getReferral( SearchResponseReference resp )
{
ReferralImpl ref = new ReferralImpl();
resp.setReferral( ref );
@@ -67,6 +68,7 @@
/**
* Tests for equality when the same object referrence is used.
*/
+ @Test
public void testEqualsSameObject()
{
SearchResponseReferenceImpl resp = new SearchResponseReferenceImpl( 5 );
@@ -78,6 +80,7 @@
/**
* Tests for equality when an exact copy is compared.
*/
+ @Test
public void testEqualsExactCopy()
{
SearchResponseReferenceImpl resp0 = new SearchResponseReferenceImpl( 5 );
@@ -93,6 +96,7 @@
/**
* Tests for equality when a different implementation is used.
*/
+ @Test
public void testEqualsDiffImpl()
{
SearchResponseReference resp0 = new SearchResponseReference()
@@ -170,6 +174,7 @@
/**
* Tests for inequality when the urls are not the same.
*/
+ @Test
public void testNotEqualDiffUrls()
{
SearchResponseReferenceImpl resp0 = new SearchResponseReferenceImpl( 5 );
|