commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1087559 - in /commons/proper/net/trunk/src/test/java/org/apache/commons/net/pop3: POP3ClientCommandsTest.java POP3ClientTest.java
Date Fri, 01 Apr 2011 02:24:15 GMT
Author: sebb
Date: Fri Apr  1 02:24:15 2011
New Revision: 1087559

URL: http://svn.apache.org/viewvc?rev=1087559&view=rev
Log:
NET-397 POP3.setState() should not be public.
Deprecated, and changed to do nothing. Added package-private method for use by POP3 classes.

Modified:
    commons/proper/net/trunk/src/test/java/org/apache/commons/net/pop3/POP3ClientCommandsTest.java
    commons/proper/net/trunk/src/test/java/org/apache/commons/net/pop3/POP3ClientTest.java

Modified: commons/proper/net/trunk/src/test/java/org/apache/commons/net/pop3/POP3ClientCommandsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/test/java/org/apache/commons/net/pop3/POP3ClientCommandsTest.java?rev=1087559&r1=1087558&r2=1087559&view=diff
==============================================================================
--- commons/proper/net/trunk/src/test/java/org/apache/commons/net/pop3/POP3ClientCommandsTest.java
(original)
+++ commons/proper/net/trunk/src/test/java/org/apache/commons/net/pop3/POP3ClientCommandsTest.java
Fri Apr  1 02:24:15 2011
@@ -102,7 +102,7 @@ public class POP3ClientCommandsTest exte
         assertTrue(p.noop());
 
         //Should fail in update state
-        p.setState(POP3.UPDATE_STATE);
+        p._setState(POP3.UPDATE_STATE);
         assertFalse(p.noop());
     }
 
@@ -140,7 +140,7 @@ public class POP3ClientCommandsTest exte
         reset();
         connect();
         login();
-        p.setState(POP3.UPDATE_STATE);
+        p._setState(POP3.UPDATE_STATE);
         assertNull(p.status());
     }
 
@@ -166,7 +166,7 @@ public class POP3ClientCommandsTest exte
         }
 
         //Now test from the update state
-        p.setState(POP3.UPDATE_STATE);
+        p._setState(POP3.UPDATE_STATE);
         msg = p.listMessages();
         assertNull(msg);
     }
@@ -201,7 +201,7 @@ public class POP3ClientCommandsTest exte
         assertNull(msg);
 
         //Now try to get a valid message from the update state
-        p.setState(POP3.UPDATE_STATE);
+        p._setState(POP3.UPDATE_STATE);
         msg = p.listMessage(1);
         assertNull(msg);
     }
@@ -220,7 +220,7 @@ public class POP3ClientCommandsTest exte
         assertEquals(0, msg.length);
 
         //Now test from the update state
-        p.setState(POP3.UPDATE_STATE);
+        p._setState(POP3.UPDATE_STATE);
         msg = p.listMessages();
         assertNull(msg);
     }
@@ -261,7 +261,7 @@ public class POP3ClientCommandsTest exte
         }
 
         //Now test from the update state
-        p.setState(POP3.UPDATE_STATE);
+        p._setState(POP3.UPDATE_STATE);
         msg = p.listUniqueIdentifiers();
         assertNull(msg);
     }
@@ -295,7 +295,7 @@ public class POP3ClientCommandsTest exte
         assertNull(msg);
 
         //Now try to get a valid message from the update state
-        p.setState(POP3.UPDATE_STATE);
+        p._setState(POP3.UPDATE_STATE);
         msg = p.listUniqueIdentifier(1);
         assertNull(msg);
     }
@@ -314,7 +314,7 @@ public class POP3ClientCommandsTest exte
         assertEquals(0, msg.length);
 
         //Now test from the update state
-        p.setState(POP3.UPDATE_STATE);
+        p._setState(POP3.UPDATE_STATE);
         msg = p.listUniqueIdentifiers();
         assertNull(msg);
     }
@@ -414,7 +414,7 @@ public class POP3ClientCommandsTest exte
         assertNull(p.retrieveMessage(100000));
 
         //Change states and try to get a valid message
-        p.setState(POP3.UPDATE_STATE);
+        p._setState(POP3.UPDATE_STATE);
         assertNull(p.retrieveMessage(1));
     }
 
@@ -518,7 +518,7 @@ public class POP3ClientCommandsTest exte
         assertNull(p.retrieveMessageTop(100000, 10));
 
         //Change states and try to get a valid message
-        p.setState(POP3.UPDATE_STATE);
+        p._setState(POP3.UPDATE_STATE);
         assertNull(p.retrieveMessageTop(1, 10));
     }
 
@@ -593,7 +593,7 @@ public class POP3ClientCommandsTest exte
         connect();
         login();
 
-        p.setState(POP3.UPDATE_STATE);
+        p._setState(POP3.UPDATE_STATE);
         assertFalse(p.reset());
 
         assertFalse(p.deleteMessage(1));

Modified: commons/proper/net/trunk/src/test/java/org/apache/commons/net/pop3/POP3ClientTest.java
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/test/java/org/apache/commons/net/pop3/POP3ClientTest.java?rev=1087559&r1=1087558&r2=1087559&view=diff
==============================================================================
--- commons/proper/net/trunk/src/test/java/org/apache/commons/net/pop3/POP3ClientTest.java
(original)
+++ commons/proper/net/trunk/src/test/java/org/apache/commons/net/pop3/POP3ClientTest.java
Fri Apr  1 02:24:15 2011
@@ -136,13 +136,13 @@ public class POP3ClientTest extends Test
 
         //Now connect and set the state to 'transaction' and try again
         connect();
-        p.setState(POP3.TRANSACTION_STATE);
+        p._setState(POP3.TRANSACTION_STATE);
         assertFalse(p.login(user, password));
         p.disconnect();
 
         //Now connect and set the state to 'update' and try again
         connect();
-        p.setState(POP3.UPDATE_STATE);
+        p._setState(POP3.UPDATE_STATE);
         assertFalse(p.login(user, password));
         p.disconnect();
     }
@@ -164,7 +164,7 @@ public class POP3ClientTest extends Test
         reset();
         connect();
         login();
-        p.setState(POP3.UPDATE_STATE);
+        p._setState(POP3.UPDATE_STATE);
         assertTrue(p.logout());
     }
 }



Mime
View raw message