Search in sources :

Example 1 with Rfc822Validator

use of com.android.common.Rfc822Validator in project Etar-Calendar by Etar-Group.

the class EditEventHelperTest method setUp.

@Override
public void setUp() {
    Time time = new Time(Time.TIMEZONE_UTC);
    time.set(TEST_START);
    time.timezone = LOCAL_TZ;
    TEST_START2 = time.normalize(true);
    time.timezone = Time.TIMEZONE_UTC;
    time.set(TEST_END);
    time.timezone = LOCAL_TZ;
    TEST_END2 = time.normalize(true);
    mEmailValidator = new Rfc822Validator(null);
}
Also used : Rfc822Validator(com.android.common.Rfc822Validator) Time(android.text.format.Time)

Example 2 with Rfc822Validator

use of com.android.common.Rfc822Validator in project Etar-Calendar by Etar-Group.

the class EditEventHelperTest method testGetAddressesFromList.

@Smoke
@SmallTest
public void testGetAddressesFromList() {
    mActivity = buildTestContext();
    mHelper = new EditEventHelper(mActivity, null);
    LinkedHashSet<Rfc822Token> expected = new LinkedHashSet<Rfc822Token>();
    expected.add(new Rfc822Token(null, "ad1@email.com", ""));
    expected.add(new Rfc822Token("First Last", "first@email.com", "comment"));
    expected.add(new Rfc822Token(null, "one.two.three@email.grue", ""));
    LinkedHashSet<Rfc822Token> actual = mHelper.getAddressesFromList(TEST_ADDRESSES, new Rfc822Validator(null));
    assertEquals(expected, actual);
}
Also used : LinkedHashSet(java.util.LinkedHashSet) Rfc822Validator(com.android.common.Rfc822Validator) Rfc822Token(android.text.util.Rfc822Token) SmallTest(android.test.suitebuilder.annotation.SmallTest) Smoke(android.test.suitebuilder.annotation.Smoke)

Aggregations

Rfc822Validator (com.android.common.Rfc822Validator)2 SmallTest (android.test.suitebuilder.annotation.SmallTest)1 Smoke (android.test.suitebuilder.annotation.Smoke)1 Time (android.text.format.Time)1 Rfc822Token (android.text.util.Rfc822Token)1 LinkedHashSet (java.util.LinkedHashSet)1