directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject svn commit: r209211 - /directory/network/trunk/src/test/org/apache/mina/common/IoFilterChainTest.java
Date Tue, 05 Jul 2005 04:19:31 GMT
Author: trustin
Date: Mon Jul  4 21:19:29 2005
New Revision: 209211

URL: http://svn.apache.org/viewcvs?rev=209211&view=rev
Log:
Fixed: failing tests.

Modified:
    directory/network/trunk/src/test/org/apache/mina/common/IoFilterChainTest.java

Modified: directory/network/trunk/src/test/org/apache/mina/common/IoFilterChainTest.java
URL: http://svn.apache.org/viewcvs/directory/network/trunk/src/test/org/apache/mina/common/IoFilterChainTest.java?rev=209211&r1=209210&r2=209211&view=diff
==============================================================================
--- directory/network/trunk/src/test/org/apache/mina/common/IoFilterChainTest.java (original)
+++ directory/network/trunk/src/test/org/apache/mina/common/IoFilterChainTest.java Mon Jul
 4 21:19:29 2005
@@ -65,28 +65,15 @@
              "ASC BSC HSC" );
     }
     
-    public void testInitDestroy() throws Exception
+    public void testAddRemove() throws Exception
     {
-        IoFilterChainImpl chain2 = new IoFilterChainImpl();
-        IoFilter filter = new InitDestroyTestFilter();
+        IoFilter filter = new AddRemoveTestFilter();
 
         chain.addFirst( "A", filter );
-        assertEquals( "INIT", result );
+        assertEquals( "ADDED", result );
         
-        chain2.addFirst( "B", filter );
-        assertEquals( "INIT", result );
-
-        chain2.addFirst( "C", filter );
-        assertEquals( "INIT", result );
-
         chain.remove( "A" );
-        assertEquals( "INIT", result );
-
-        chain2.remove( "B" );
-        assertEquals( "INIT", result );
-
-        chain2.remove( "C" );
-        assertEquals( formatResult( "INIT DESTROY" ), formatResult( result ) );
+        assertEquals( "ADDEDREMOVED", result );
     }
     
     private void run( String expectedResult )
@@ -251,16 +238,16 @@
         }
     }
 
-    private class InitDestroyTestFilter extends IoFilterAdapter
+    private class AddRemoveTestFilter extends IoFilterAdapter
     {
-        public void init()
+        public void filterAdded( Object parent )
         {
-            result += "INIT";
+            result += "ADDED";
         }
         
-        public void destroy()
+        public void filterRemoved( Object parent )
         {
-            result += "DESTROY";
+            result += "REMOVED";
         }
     }
 



Mime
View raw message