org.apache.commons.net.pop3
Class POP3ClientTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.commons.net.pop3.POP3ClientTest
All Implemented Interfaces:
junit.framework.Test

public class POP3ClientTest
extends junit.framework.TestCase

Version:
$Id: POP3ClientTest.java 631313 2008-02-26 17:41:09Z niallp $ The POP3* tests all presume the existence of the following parameters: mailserver: localhost (running on the default port 110) account: username=test; password=password account: username=alwaysempty; password=password. mail: At least four emails in the test account and zero emails in the alwaysempty account If this won't work for you, you can change these parameters in the TestSetupParameters class. The tests were originally run on a default installation of James. Your mileage may vary based on the POP3 server you run the tests against. Some servers are more standards-compliant than others.
Author:
[Net]

Constructor Summary
POP3ClientTest(String name)
           
 
Method Summary
static junit.framework.TestSuite suite()
          Method suite.
 void testInvalidLoginWithBadName()
           
 void testInvalidLoginWithBadPassword()
           
 void testLoginFromWrongState()
          Test to try to run the login method from the disconnected, transaction and update states
 void testLogoutFromAllStates()
           
 void testValidLoginWithNameAndPassword()
          Simple test to logon to a valid server using a valid user name and password.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

POP3ClientTest

public POP3ClientTest(String name)
Method Detail

suite

public static junit.framework.TestSuite suite()
Method suite.

Returns:
TestSuite

testValidLoginWithNameAndPassword

public void testValidLoginWithNameAndPassword()
                                       throws Exception
Simple test to logon to a valid server using a valid user name and password.

Throws:
Exception

testInvalidLoginWithBadName

public void testInvalidLoginWithBadName()
                                 throws Exception
Throws:
Exception

testInvalidLoginWithBadPassword

public void testInvalidLoginWithBadPassword()
                                     throws Exception
Throws:
Exception

testLoginFromWrongState

public void testLoginFromWrongState()
                             throws Exception
Test to try to run the login method from the disconnected, transaction and update states

Throws:
Exception

testLogoutFromAllStates

public void testLogoutFromAllStates()
                             throws Exception
Throws:
Exception


Copyright © 1997-2011 Apache Software Foundation. All Rights Reserved.