1
0
mirror of https://github.com/moparisthebest/davmail synced 2024-12-13 11:12:22 -05:00

Test various event count

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1758 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2011-08-04 19:49:45 +00:00
parent dfc1338e90
commit 6f1dbf05f8

View File

@ -19,6 +19,8 @@
package davmail.exchange; package davmail.exchange;
import davmail.Settings; import davmail.Settings;
import davmail.exchange.ews.EwsExchangeSession;
import org.apache.log4j.Level;
import javax.mail.MessagingException; import javax.mail.MessagingException;
import java.io.FileOutputStream; import java.io.FileOutputStream;
@ -189,6 +191,23 @@ public class TestExchangeSessionCalendar extends AbstractExchangeSessionTestCase
} }
} }
public void testSearchEventCount() throws IOException {
Settings.setLoggingLevel("davmail", Level.WARN);
System.out.println("Item count: " + session.searchEvents("calendar", null).size());
System.out.println("InstanceType null: " + session.searchEvents("calendar", session.isNull("instancetype")).size());
System.out.println("InstanceType not null: " + session.searchEvents("calendar", session.not(session.isNull("instancetype"))).size());
System.out.println("InstanceType 0: " + session.searchEvents("calendar", session.isEqualTo("instancetype", 0)).size());
System.out.println("InstanceType 1: " + session.searchEvents("calendar", session.isEqualTo("instancetype", 1)).size());
System.out.println("InstanceType 2: " + session.searchEvents("calendar", session.isEqualTo("instancetype", 2)).size());
System.out.println("InstanceType 3: " + session.searchEvents("calendar", session.isEqualTo("instancetype", 3)).size());
if (session instanceof EwsExchangeSession) {
System.out.println("Recurring: " + session.searchEvents("calendar", session.isTrue("isrecurring")).size());
System.out.println("Non recurring: " + session.searchEvents("calendar", session.isFalse("isrecurring")).size());
System.out.println("Null recurring: " + session.searchEvents("calendar", session.isNull("isrecurring")).size());
}
}
} }