Search in sources :

Example 11 with StoreConfig

use of com.fsck.k9.mail.store.StoreConfig in project k-9 by k9mail.

the class SmtpTransportTest method SmtpTransport_withInvalidTransportUri_shouldThrow.

@Test(expected = MessagingException.class)
public void SmtpTransport_withInvalidTransportUri_shouldThrow() throws Exception {
    StoreConfig storeConfig = createStoreConfigWithTransportUri("smpt://");
    new SmtpTransport(storeConfig, socketFactory, oAuth2TokenProvider);
}
Also used : StoreConfig(com.fsck.k9.mail.store.StoreConfig) XOAuth2ChallengeParserTest(com.fsck.k9.mail.XOAuth2ChallengeParserTest) Test(org.junit.Test)

Example 12 with StoreConfig

use of com.fsck.k9.mail.store.StoreConfig in project k-9 by k9mail.

the class ImapStoreTest method createStoreConfig.

private StoreConfig createStoreConfig() {
    StoreConfig storeConfig = mock(StoreConfig.class);
    when(storeConfig.getInboxFolderName()).thenReturn("INBOX");
    when(storeConfig.getStoreUri()).thenReturn("imap://user:password@imap.example.org");
    return storeConfig;
}
Also used : StoreConfig(com.fsck.k9.mail.store.StoreConfig)

Example 13 with StoreConfig

use of com.fsck.k9.mail.store.StoreConfig in project k-9 by k9mail.

the class ImapStoreTest method setUp.

@Before
public void setUp() throws Exception {
    storeConfig = createStoreConfig();
    TrustedSocketFactory trustedSocketFactory = mock(TrustedSocketFactory.class);
    ConnectivityManager connectivityManager = mock(ConnectivityManager.class);
    OAuth2TokenProvider oauth2TokenProvider = mock(OAuth2TokenProvider.class);
    imapStore = new TestImapStore(storeConfig, trustedSocketFactory, connectivityManager, oauth2TokenProvider);
}
Also used : TrustedSocketFactory(com.fsck.k9.mail.ssl.TrustedSocketFactory) ConnectivityManager(android.net.ConnectivityManager) OAuth2TokenProvider(com.fsck.k9.mail.oauth.OAuth2TokenProvider) Before(org.junit.Before)

Aggregations

StoreConfig (com.fsck.k9.mail.store.StoreConfig)11 Test (org.junit.Test)8 ConnectivityManager (android.net.ConnectivityManager)2 XOAuth2ChallengeParserTest (com.fsck.k9.mail.XOAuth2ChallengeParserTest)2 OAuth2TokenProvider (com.fsck.k9.mail.oauth.OAuth2TokenProvider)2 MessagingException (com.fsck.k9.mail.MessagingException)1 Store (com.fsck.k9.mail.Store)1 DefaultTrustedSocketFactory (com.fsck.k9.mail.ssl.DefaultTrustedSocketFactory)1 TrustedSocketFactory (com.fsck.k9.mail.ssl.TrustedSocketFactory)1 ImapStore (com.fsck.k9.mail.store.imap.ImapStore)1 Pop3Store (com.fsck.k9.mail.store.pop3.Pop3Store)1 WebDavStore (com.fsck.k9.mail.store.webdav.WebDavStore)1 Before (org.junit.Before)1