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());
}
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());
}
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");
}
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());
}
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()");
}
}
Aggregations