Merge "Add @SmallTest, @MediumTest annotations to Exchange tests"
diff --git a/src/com/android/exchange/CalendarSyncEnabler.java b/src/com/android/exchange/CalendarSyncEnabler.java
index ba4fa56..dff1f38 100644
--- a/src/com/android/exchange/CalendarSyncEnabler.java
+++ b/src/com/android/exchange/CalendarSyncEnabler.java
@@ -85,7 +85,6 @@
}
// *** Taken from NotificationController
- // STOPSHIP This should be cleaned up (per stadler)
public static final int NOTIFICATION_ID_EXCHANGE_CALENDAR_ADDED = 2;
/**
diff --git a/tests/src/com/android/exchange/CalendarSyncEnablerTest.java b/tests/src/com/android/exchange/CalendarSyncEnablerTest.java
index f155c68..6d19288 100644
--- a/tests/src/com/android/exchange/CalendarSyncEnablerTest.java
+++ b/tests/src/com/android/exchange/CalendarSyncEnablerTest.java
@@ -32,6 +32,7 @@
import android.database.Cursor;
import android.provider.Calendar;
import android.test.MoreAsserts;
+import android.test.suitebuilder.annotation.MediumTest;
import android.text.TextUtils;
import android.util.Log;
@@ -40,7 +41,7 @@
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
-
+@MediumTest
public class CalendarSyncEnablerTest extends ExchangeTestCase {
protected static final String TEST_ACCOUNT_PREFIX = "__test";
diff --git a/tests/src/com/android/exchange/EasOutboxServiceTests.java b/tests/src/com/android/exchange/EasOutboxServiceTests.java
index 8ff043c..58d0d26 100644
--- a/tests/src/com/android/exchange/EasOutboxServiceTests.java
+++ b/tests/src/com/android/exchange/EasOutboxServiceTests.java
@@ -19,11 +19,13 @@
import com.android.emailcommon.provider.EmailContent.Mailbox;
import com.android.exchange.utility.ExchangeTestCase;
+import android.test.suitebuilder.annotation.MediumTest;
+
/**
* You can run this entire test case with:
* runtest -c com.android.exchange.EasOutboxServiceTests exchange
*/
-
+@MediumTest
public class EasOutboxServiceTests extends ExchangeTestCase {
public void testGenerateSmartSendCmd() {
diff --git a/tests/src/com/android/exchange/EasSyncServiceTests.java b/tests/src/com/android/exchange/EasSyncServiceTests.java
index 571b9ca..791e41a 100644
--- a/tests/src/com/android/exchange/EasSyncServiceTests.java
+++ b/tests/src/com/android/exchange/EasSyncServiceTests.java
@@ -25,6 +25,7 @@
import android.content.Context;
import android.test.AndroidTestCase;
+import android.test.suitebuilder.annotation.SmallTest;
import android.util.Base64;
import java.io.File;
@@ -34,7 +35,7 @@
* You can run this entire test case with:
* runtest -c com.android.exchange.EasSyncServiceTests exchange
*/
-
+@SmallTest
public class EasSyncServiceTests extends AndroidTestCase {
static private final String USER = "user";
static private final String PASSWORD = "password";
diff --git a/tests/src/com/android/exchange/ExchangeServiceAccountTests.java b/tests/src/com/android/exchange/ExchangeServiceAccountTests.java
index 8c84234..991a235 100644
--- a/tests/src/com/android/exchange/ExchangeServiceAccountTests.java
+++ b/tests/src/com/android/exchange/ExchangeServiceAccountTests.java
@@ -23,12 +23,15 @@
import com.android.exchange.provider.EmailContentSetupUtils;
import com.android.exchange.utility.ExchangeTestCase;
+import android.test.suitebuilder.annotation.MediumTest;
+
import java.util.concurrent.ConcurrentHashMap;
/**
* You can run this entire test case with:
* runtest -c com.android.exchange.ExchangeServiceAccountTests exchange
*/
+@MediumTest
public class ExchangeServiceAccountTests extends ExchangeTestCase {
public ExchangeServiceAccountTests() {
diff --git a/tests/src/com/android/exchange/ExchangeServiceTest.java b/tests/src/com/android/exchange/ExchangeServiceTest.java
index 98703c2..b4be23f 100644
--- a/tests/src/com/android/exchange/ExchangeServiceTest.java
+++ b/tests/src/com/android/exchange/ExchangeServiceTest.java
@@ -19,9 +19,10 @@
import android.content.Context;
import android.content.ContextWrapper;
import android.test.AndroidTestCase;
+import android.test.suitebuilder.annotation.SmallTest;
import java.io.File;
-
+@SmallTest
public class ExchangeServiceTest extends AndroidTestCase {
private static class MyContext extends ContextWrapper {
public boolean isGetFileStreamPathCalled;
diff --git a/tests/src/com/android/exchange/TagsTests.java b/tests/src/com/android/exchange/TagsTests.java
index 1a87c5c..55b27c0 100644
--- a/tests/src/com/android/exchange/TagsTests.java
+++ b/tests/src/com/android/exchange/TagsTests.java
@@ -19,9 +19,10 @@
import com.android.exchange.adapter.Tags;
import android.test.AndroidTestCase;
+import android.test.suitebuilder.annotation.SmallTest;
import java.util.HashMap;
-
+@SmallTest
public class TagsTests extends AndroidTestCase {
// Make sure there are no duplicates in the tags table
diff --git a/tests/src/com/android/exchange/adapter/CalendarSyncAdapterTests.java b/tests/src/com/android/exchange/adapter/CalendarSyncAdapterTests.java
index cc049ea..96ce7aa 100644
--- a/tests/src/com/android/exchange/adapter/CalendarSyncAdapterTests.java
+++ b/tests/src/com/android/exchange/adapter/CalendarSyncAdapterTests.java
@@ -33,6 +33,7 @@
import android.test.RenamingDelegatingContext;
import android.test.mock.MockContentResolver;
import android.test.mock.MockContext;
+import android.test.suitebuilder.annotation.MediumTest;
import java.io.ByteArrayInputStream;
import java.io.File;
@@ -45,7 +46,7 @@
* You can run this entire test case with:
* runtest -c com.android.exchange.adapter.CalendarSyncAdapterTests exchange
*/
-
+@MediumTest
public class CalendarSyncAdapterTests extends SyncAdapterTestCase<CalendarSyncAdapter> {
private static final String[] ATTENDEE_PROJECTION = new String[] {Attendees.ATTENDEE_EMAIL,
Attendees.ATTENDEE_NAME, Attendees.ATTENDEE_STATUS};
diff --git a/tests/src/com/android/exchange/adapter/EmailSyncAdapterTests.java b/tests/src/com/android/exchange/adapter/EmailSyncAdapterTests.java
index 90cfd78..5ba7288 100644
--- a/tests/src/com/android/exchange/adapter/EmailSyncAdapterTests.java
+++ b/tests/src/com/android/exchange/adapter/EmailSyncAdapterTests.java
@@ -29,13 +29,14 @@
import android.content.ContentUris;
import android.content.ContentValues;
+import android.test.suitebuilder.annotation.SmallTest;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.GregorianCalendar;
import java.util.TimeZone;
-
+@SmallTest
public class EmailSyncAdapterTests extends SyncAdapterTestCase<EmailSyncAdapter> {
private static final String WHERE_ACCOUNT_KEY = Message.ACCOUNT_KEY + "=?";
diff --git a/tests/src/com/android/exchange/adapter/FolderSyncParserTests.java b/tests/src/com/android/exchange/adapter/FolderSyncParserTests.java
index 6c2ca74..c38eabc 100644
--- a/tests/src/com/android/exchange/adapter/FolderSyncParserTests.java
+++ b/tests/src/com/android/exchange/adapter/FolderSyncParserTests.java
@@ -20,6 +20,8 @@
import com.android.exchange.EasSyncService;
import com.android.exchange.provider.EmailContentSetupUtils;
+import android.test.suitebuilder.annotation.MediumTest;
+
import java.io.IOException;
import java.util.HashMap;
@@ -27,7 +29,7 @@
* You can run this entire test case with:
* runtest -c com.android.exchange.adapter.FolderSyncParserTests exchange
*/
-
+@MediumTest
public class FolderSyncParserTests extends SyncAdapterTestCase<EmailSyncAdapter> {
public FolderSyncParserTests() {
diff --git a/tests/src/com/android/exchange/adapter/ProvisionParserTests.java b/tests/src/com/android/exchange/adapter/ProvisionParserTests.java
index 3a9f037..2bc9927 100644
--- a/tests/src/com/android/exchange/adapter/ProvisionParserTests.java
+++ b/tests/src/com/android/exchange/adapter/ProvisionParserTests.java
@@ -18,6 +18,8 @@
import com.android.emailcommon.service.PolicySet;
+import android.test.suitebuilder.annotation.SmallTest;
+
import java.io.ByteArrayInputStream;
import java.io.IOException;
@@ -25,6 +27,7 @@
* You can run this entire test case with:
* runtest -c com.android.exchange.adapter.ProvisionParserTests exchange
*/
+@SmallTest
public class ProvisionParserTests extends SyncAdapterTestCase {
private final ByteArrayInputStream mTestInputStream =
new ByteArrayInputStream("ABCDEFG".getBytes());
diff --git a/tests/src/com/android/exchange/provider/ExchangeDirectoryProviderTests.java b/tests/src/com/android/exchange/provider/ExchangeDirectoryProviderTests.java
index 053fdff..b163637 100644
--- a/tests/src/com/android/exchange/provider/ExchangeDirectoryProviderTests.java
+++ b/tests/src/com/android/exchange/provider/ExchangeDirectoryProviderTests.java
@@ -27,11 +27,13 @@
import android.net.Uri;
import android.provider.ContactsContract.CommonDataKinds;
import android.provider.ContactsContract.Contacts;
+import android.test.suitebuilder.annotation.SmallTest;
/**
* You can run this entire test case with:
* runtest -c com.android.exchange.provider.ExchangeDirectoryProviderTests exchange
*/
+@SmallTest
public class ExchangeDirectoryProviderTests extends ExchangeTestCase {
public ExchangeDirectoryProviderTests() {
diff --git a/tests/src/com/android/exchange/provider/MailboxUtilitiesTests.java b/tests/src/com/android/exchange/provider/MailboxUtilitiesTests.java
index 1041462..d2b3e48 100644
--- a/tests/src/com/android/exchange/provider/MailboxUtilitiesTests.java
+++ b/tests/src/com/android/exchange/provider/MailboxUtilitiesTests.java
@@ -24,6 +24,7 @@
import android.content.ContentResolver;
import android.content.ContentUris;
import android.content.ContentValues;
+import android.test.suitebuilder.annotation.MediumTest;
/**
* Tests of MailboxUtilities.
@@ -31,6 +32,7 @@
* You can run this entire test case with:
* runtest -c com.android.exchange.provider.MailboxUtilitiesTests exchange
*/
+@MediumTest
public class MailboxUtilitiesTests extends ExchangeTestCase {
// All tests must build their accounts in mAccount so it will be deleted from live data
diff --git a/tests/src/com/android/exchange/provider/MockProviderTests.java b/tests/src/com/android/exchange/provider/MockProviderTests.java
index 010e9e7..897f0d8 100644
--- a/tests/src/com/android/exchange/provider/MockProviderTests.java
+++ b/tests/src/com/android/exchange/provider/MockProviderTests.java
@@ -27,6 +27,7 @@
import android.os.RemoteException;
import android.test.ProviderTestCase2;
import android.test.mock.MockContentResolver;
+import android.test.suitebuilder.annotation.SmallTest;
import java.util.ArrayList;
@@ -34,6 +35,7 @@
* You can run this entire test case with:
* runtest -c com.android.exchange.provider.MockProviderTests exchange
*/
+@SmallTest
public class MockProviderTests extends ProviderTestCase2<MockProvider> {
Context mMockContext;
MockContentResolver mMockResolver;
diff --git a/tests/src/com/android/exchange/utility/CalendarUtilitiesTests.java b/tests/src/com/android/exchange/utility/CalendarUtilitiesTests.java
index 56eac41..c5ffd8d 100644
--- a/tests/src/com/android/exchange/utility/CalendarUtilitiesTests.java
+++ b/tests/src/com/android/exchange/utility/CalendarUtilitiesTests.java
@@ -34,6 +34,7 @@
import android.content.res.Resources;
import android.provider.Calendar.Attendees;
import android.provider.Calendar.Events;
+import android.test.suitebuilder.annotation.MediumTest;
import android.util.Log;
import java.io.BufferedReader;
@@ -56,7 +57,7 @@
* Please see RFC2445 for RRULE definition
* http://www.ietf.org/rfc/rfc2445.txt
*/
-
+@MediumTest
public class CalendarUtilitiesTests extends SyncAdapterTestCase<CalendarSyncAdapter> {
// Some prebuilt time zones, Base64 encoded (as they arrive from EAS)
diff --git a/tests/src/com/android/exchange/utility/SimpleIcsWriterTests.java b/tests/src/com/android/exchange/utility/SimpleIcsWriterTests.java
index c2ea85d..94c53b7 100644
--- a/tests/src/com/android/exchange/utility/SimpleIcsWriterTests.java
+++ b/tests/src/com/android/exchange/utility/SimpleIcsWriterTests.java
@@ -17,6 +17,8 @@
import com.android.emailcommon.utility.Utility;
+import android.test.suitebuilder.annotation.SmallTest;
+
import junit.framework.TestCase;
/**
@@ -24,6 +26,7 @@
* You can run this entire test case with:
* runtest -c com.android.exchange.utility.SimpleIcsWriterTests exchange
*/
+@SmallTest
public class SimpleIcsWriterTests extends TestCase {
private static final String CRLF = "\r\n";
private static final String UTF8_1_BYTE = "a";