From 3471a6dbabeb3f90baba775a3bae15b5756b9ba7 Mon Sep 17 00:00:00 2001 From: mguessan Date: Fri, 30 Oct 2009 15:13:06 +0000 Subject: [PATCH] Fix test git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@806 3d1905a2-6b24-0410-a738-b14d5a86fcbd --- .../davmail/exchange/TestExchangeSession.java | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/test/davmail/exchange/TestExchangeSession.java b/src/test/davmail/exchange/TestExchangeSession.java index a49cfdae..2306830e 100644 --- a/src/test/davmail/exchange/TestExchangeSession.java +++ b/src/test/davmail/exchange/TestExchangeSession.java @@ -4,13 +4,17 @@ import davmail.Settings; import davmail.http.DavGatewaySSLProtocolSocketFactory; /** - * + * Test Exchange session */ public class TestExchangeSession { - protected TestExchangeSession() { + private TestExchangeSession() { } + /** + * main method + * @param argv command line arg + */ public static void main(String[] argv) { // register custom SSL Socket factory int currentArg = 0; @@ -23,17 +27,10 @@ public class TestExchangeSession { // test auth try { ExchangeSessionFactory.checkConfig(); - session = ExchangeSessionFactory.getInstance(argv[currentArg++], argv[currentArg++]); + session = ExchangeSessionFactory.getInstance(argv[currentArg++], argv[currentArg]); ExchangeSession.Folder folder = session.getFolder("INBOX"); - - 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"); + folder.loadMessages(); //session.purgeOldestTrashAndSentMessages();