Search in sources :

Example 26 with Preferences

use of com.fsck.k9.Preferences in project ORCID-Source by ORCID.

the class ValidateV2RC2SamplesTest method testUnmarshallPreferences.

@Test
public void testUnmarshallPreferences() throws SAXException, URISyntaxException {
    Preferences preferences = (Preferences) unmarshallFromPath("/record_2.0_rc2/samples/preferences-2.0_rc2.xml", Preferences.class, "/record_2.0_rc2/preferences-2.0_rc2.xsd");
    assertNotNull(preferences);
    assertNotNull(preferences.getLocale());
    assertEquals(Locale.EN, preferences.getLocale());
}
Also used : Preferences(org.orcid.jaxb.model.record_rc2.Preferences) Test(org.junit.Test)

Example 27 with Preferences

use of com.fsck.k9.Preferences in project ORCID-Source by ORCID.

the class ValidateV2_1SamplesTest method testUnmarshallPreferences.

@Test
public void testUnmarshallPreferences() throws SAXException, URISyntaxException {
    Preferences preferences = (Preferences) unmarshallFromPath("/record_2.1/samples/read_samples/preferences-2.1.xml", Preferences.class, "/record_2.1/preferences-2.1.xsd");
    assertNotNull(preferences);
    assertNotNull(preferences.getLocale());
    assertEquals(Locale.EN, preferences.getLocale());
}
Also used : Preferences(org.orcid.jaxb.model.record_v2.Preferences) Test(org.junit.Test)

Example 28 with Preferences

use of com.fsck.k9.Preferences in project ORCID-Source by ORCID.

the class ValidateV2SamplesTest method testMarshallPreferences.

@Test
public void testMarshallPreferences() throws JAXBException, SAXException, URISyntaxException {
    Preferences object = (Preferences) unmarshallFromPath("/record_2.0/samples/read_samples/preferences-2.0.xml", Preferences.class);
    marshall(object, "/record_2.0/preferences-2.0.xsd");
}
Also used : Preferences(org.orcid.jaxb.model.record_v2.Preferences) Test(org.junit.Test)

Example 29 with Preferences

use of com.fsck.k9.Preferences in project ORCID-Source by ORCID.

the class ValidateV2RC4SamplesTest method testUnmarshallPreferences.

@Test
public void testUnmarshallPreferences() throws SAXException, URISyntaxException {
    Preferences preferences = (Preferences) unmarshallFromPath("/record_2.0_rc4/samples/preferences-2.0_rc4.xml", Preferences.class, "/record_2.0_rc4/preferences-2.0_rc4.xsd");
    assertNotNull(preferences);
    assertNotNull(preferences.getLocale());
    assertEquals(Locale.EN, preferences.getLocale());
}
Also used : Preferences(org.orcid.jaxb.model.record_rc4.Preferences) Test(org.junit.Test)

Example 30 with Preferences

use of com.fsck.k9.Preferences in project k-9 by k9mail.

the class MlfUtils method setLastSelectedFolderName.

static void setLastSelectedFolderName(Preferences preferences, List<MessageReference> messages, String destFolderName) {
    try {
        MessageReference firstMsg = messages.get(0);
        Account account = preferences.getAccount(firstMsg.getAccountUuid());
        LocalFolder firstMsgFolder = MlfUtils.getOpenFolder(firstMsg.getFolderName(), account);
        firstMsgFolder.setLastSelectedFolderName(destFolderName);
    } catch (MessagingException e) {
        Timber.e(e, "Error getting folder for setLastSelectedFolderName()");
    }
}
Also used : LocalFolder(com.fsck.k9.mailstore.LocalFolder) Account(com.fsck.k9.Account) MessagingException(com.fsck.k9.mail.MessagingException) MessageReference(com.fsck.k9.activity.MessageReference)

Aggregations

Preferences (com.fsck.k9.Preferences)17 Account (com.fsck.k9.Account)15 Test (org.junit.Test)12 StorageEditor (com.fsck.k9.preferences.StorageEditor)9 Storage (com.fsck.k9.preferences.Storage)6 Preferences (org.apereo.portal.soffit.model.v1_0.Preferences)5 Preferences (org.orcid.jaxb.model.record_v2.Preferences)5 SharedPreferences (android.content.SharedPreferences)4 Intent (android.content.Intent)3 Uri (android.net.Uri)3 MessagingException (com.fsck.k9.mail.MessagingException)3 NetworkType (com.fsck.k9.mail.NetworkType)3 SearchAccount (com.fsck.k9.search.SearchAccount)3 IOException (java.io.IOException)3 ArrayList (java.util.ArrayList)3 HashMap (java.util.HashMap)3 Map (java.util.Map)3 CheckBoxPreference (android.preference.CheckBoxPreference)2 ListPreference (android.preference.ListPreference)2 Preference (android.preference.Preference)2