1 17 18 package org.apache.james.imapserver; 19 20 import org.apache.james.test.SimpleFileProtocolTest; 21 22 import junit.framework.Test; 23 import junit.framework.TestSuite; 24 25 29 public class TestCommandsInAuthenticatedState 30 extends SimpleFileProtocolTest implements ImapTest 31 { 32 public TestCommandsInAuthenticatedState( String name ) 33 { 34 super( name ); 35 } 36 37 41 public void setUp() throws Exception 42 { 43 super.setUp(); 44 addTestFile( "Welcome.test", preElements ); 45 addLogin( USER, PASSWORD ); 46 } 47 48 protected void addLogin( String username, String password ) 49 { 50 preElements.CL( "a001 LOGIN " + username + " " + password ); 51 preElements.SL( "a001 OK LOGIN completed", "TestCommandsInAuthenticatedState.java:33" ); 52 } 53 54 58 public static Test suite() throws Exception 59 { 60 TestSuite suite = new TestSuite(); 61 suite.addTest( new TestCommandsInAuthenticatedState( "ValidSelected" ) ); 63 suite.addTest( new TestCommandsInAuthenticatedState( "ValidNonAuthenticated" ) ); 64 65 suite.addTest( new TestCommandsInAuthenticatedState( "Capability" ) ); 67 suite.addTest( new TestCommandsInAuthenticatedState( "Noop" ) ); 68 suite.addTest( new TestCommandsInAuthenticatedState( "Logout" ) ); 69 70 suite.addTest( new TestCommandsInAuthenticatedState( "ExamineInbox" ) ); 72 suite.addTest( new TestCommandsInAuthenticatedState( "SelectInbox" ) ); 73 suite.addTest( new TestCommandsInAuthenticatedState( "Create" ) ); 74 suite.addTest( new TestCommandsInAuthenticatedState( "ExamineEmpty" ) ); 75 suite.addTest( new TestCommandsInAuthenticatedState( "SelectEmpty" ) ); 76 suite.addTest( new TestCommandsInAuthenticatedState( "ListNamespace" ) ); 77 suite.addTest( new TestCommandsInAuthenticatedState( "ListMailboxes" ) ); 78 suite.addTest( new TestCommandsInAuthenticatedState( "Status" ) ); 79 suite.addTest( new TestCommandsInAuthenticatedState( "Subscribe" ) ); 80 suite.addTest( new TestCommandsInAuthenticatedState( "Delete" ) ); 81 suite.addTest( new TestCommandsInAuthenticatedState( "Append" ) ); 82 83 return suite; 84 } 85 86 } 87 | Popular Tags |