mirror of
https://github.com/moparisthebest/davmail
synced 2024-12-13 03:02:22 -05:00
Test class
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@12 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
dced97439f
commit
f3ed595bab
33
src/test/davmail/exchange/TestExchangeSession.java
Normal file
33
src/test/davmail/exchange/TestExchangeSession.java
Normal file
@ -0,0 +1,33 @@
|
||||
package davmail.exchange;
|
||||
|
||||
import davmail.Settings;
|
||||
import org.apache.commons.httpclient.util.URIUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public class TestExchangeSession {
|
||||
public static void main(String[] argv) {
|
||||
Settings.load();
|
||||
|
||||
ExchangeSession session = new ExchangeSession();
|
||||
// test auth
|
||||
try {
|
||||
session.login(argv[0], argv[1]);
|
||||
|
||||
ExchangeSession.Folder folder = session.selectFolder("tests");
|
||||
session.selectFolder("tests");
|
||||
String messageName;
|
||||
messageName = URIUtil.decode(argv[2]);
|
||||
|
||||
long startTime = System.currentTimeMillis();
|
||||
ExchangeSession.Message messageTest = session.getMessage(folder.folderUrl + "/"+messageName);
|
||||
System.out.println("******");
|
||||
messageTest.write(System.out);
|
||||
System.out.println("Elapsed time " + (System.currentTimeMillis()-startTime) + " ms");
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user