mirror of
https://github.com/moparisthebest/davmail
synced 2024-11-11 20:05:03 -05:00
Fix test
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@806 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
e4ff8946d9
commit
3471a6dbab
@ -4,13 +4,17 @@ import davmail.Settings;
|
|||||||
import davmail.http.DavGatewaySSLProtocolSocketFactory;
|
import davmail.http.DavGatewaySSLProtocolSocketFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Test Exchange session
|
||||||
*/
|
*/
|
||||||
public class TestExchangeSession {
|
public class TestExchangeSession {
|
||||||
|
|
||||||
protected TestExchangeSession() {
|
private TestExchangeSession() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* main method
|
||||||
|
* @param argv command line arg
|
||||||
|
*/
|
||||||
public static void main(String[] argv) {
|
public static void main(String[] argv) {
|
||||||
// register custom SSL Socket factory
|
// register custom SSL Socket factory
|
||||||
int currentArg = 0;
|
int currentArg = 0;
|
||||||
@ -23,17 +27,10 @@ public class TestExchangeSession {
|
|||||||
// test auth
|
// test auth
|
||||||
try {
|
try {
|
||||||
ExchangeSessionFactory.checkConfig();
|
ExchangeSessionFactory.checkConfig();
|
||||||
session = ExchangeSessionFactory.getInstance(argv[currentArg++], argv[currentArg++]);
|
session = ExchangeSessionFactory.getInstance(argv[currentArg++], argv[currentArg]);
|
||||||
|
|
||||||
ExchangeSession.Folder folder = session.getFolder("INBOX");
|
ExchangeSession.Folder folder = session.getFolder("INBOX");
|
||||||
|
folder.loadMessages();
|
||||||
long startTime = System.currentTimeMillis();
|
|
||||||
ExchangeSession.MessageList messageList = session.getAllMessageUidAndSize(folder.folderUrl);
|
|
||||||
System.out.println("******");
|
|
||||||
for (ExchangeSession.Message message : messageList) {
|
|
||||||
message.write(System.out);
|
|
||||||
}
|
|
||||||
System.out.println("Elapsed time " + (System.currentTimeMillis() - startTime) + " ms");
|
|
||||||
|
|
||||||
//session.purgeOldestTrashAndSentMessages();
|
//session.purgeOldestTrashAndSentMessages();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user