Remove unused method StoreConfig.getInboxFolder()
This commit is contained in:
parent
5abb0dc71f
commit
fcfc7e6a22
6 changed files with 3 additions and 23 deletions
|
@ -7,7 +7,6 @@ public interface StoreConfig {
|
|||
boolean isSubscribedFoldersOnly();
|
||||
boolean useCompression(NetworkType type);
|
||||
|
||||
String getInboxFolder();
|
||||
String getOutboxFolder();
|
||||
String getDraftsFolder();
|
||||
|
||||
|
|
|
@ -72,7 +72,6 @@ public class ImapFolderTest {
|
|||
BinaryTempFileBody.setTempDirectory(RuntimeEnvironment.application.getCacheDir());
|
||||
imapStore = mock(ImapStore.class);
|
||||
storeConfig = mock(StoreConfig.class);
|
||||
when(storeConfig.getInboxFolder()).thenReturn("INBOX");
|
||||
when(imapStore.getCombinedPrefix()).thenReturn("");
|
||||
when(imapStore.getStoreConfig()).thenReturn(storeConfig);
|
||||
|
||||
|
|
|
@ -39,13 +39,12 @@ import static org.mockito.Mockito.when;
|
|||
|
||||
|
||||
public class ImapStoreTest {
|
||||
private StoreConfig storeConfig;
|
||||
private StoreConfig storeConfig = mock(StoreConfig.class);
|
||||
private TestImapStore imapStore;
|
||||
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
ImapStoreSettings serverSettings = createImapStoreSettings();
|
||||
storeConfig = createStoreConfig();
|
||||
TrustedSocketFactory trustedSocketFactory = mock(TrustedSocketFactory.class);
|
||||
ConnectivityManager connectivityManager = mock(ConnectivityManager.class);
|
||||
OAuth2TokenProvider oauth2TokenProvider = mock(OAuth2TokenProvider.class);
|
||||
|
@ -378,13 +377,6 @@ public class ImapStoreTest {
|
|||
null);
|
||||
}
|
||||
|
||||
private StoreConfig createStoreConfig() {
|
||||
StoreConfig storeConfig = mock(StoreConfig.class);
|
||||
when(storeConfig.getInboxFolder()).thenReturn("INBOX");
|
||||
|
||||
return storeConfig;
|
||||
}
|
||||
|
||||
private Set<String> extractFolderServerIds(List<FolderListItem> folders) {
|
||||
Set<String> folderServerIds = new HashSet<>(folders.size());
|
||||
for (FolderListItem folder : folders) {
|
||||
|
|
|
@ -43,7 +43,6 @@ public class Pop3FolderTest {
|
|||
mockStoreConfig = mock(StoreConfig.class);
|
||||
mockListener = mock(MessageRetrievalListener.class);
|
||||
when(mockStore.getConfig()).thenReturn(mockStoreConfig);
|
||||
when(mockStoreConfig.getInboxFolder()).thenReturn(Pop3Folder.INBOX);
|
||||
when(mockStore.createConnection()).thenReturn(mockConnection);
|
||||
when(mockConnection.executeSimpleCommand(Pop3Commands.STAT_COMMAND)).thenReturn("+OK 10 0");
|
||||
folder = new Pop3Folder(mockStore, Pop3Folder.INBOX);
|
||||
|
|
|
@ -61,7 +61,6 @@ public class Pop3StoreTest {
|
|||
@Before
|
||||
public void setUp() throws Exception {
|
||||
ServerSettings serverSettings = createServerSettings();
|
||||
when(mockStoreConfig.getInboxFolder()).thenReturn(Pop3Folder.INBOX);
|
||||
when(mockTrustedSocketFactory.createSocket(null, "server", 12345, null)).thenReturn(mockSocket);
|
||||
when(mockSocket.isConnected()).thenReturn(true);
|
||||
when(mockSocket.isClosed()).thenReturn(false);
|
||||
|
|
|
@ -47,12 +47,10 @@ import org.mockito.stubbing.OngoingStubbing;
|
|||
import static junit.framework.Assert.assertSame;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.mockito.Matchers.any;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.verify;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@RunWith(K9LibRobolectricTestRunner.class)
|
||||
public class WebDavStoreTest {
|
||||
private static final HttpResponse OK_200_RESPONSE = createOkResponse();
|
||||
|
@ -70,10 +68,11 @@ public class WebDavStoreTest {
|
|||
private SchemeRegistry mockSchemeRegistry;
|
||||
@Mock
|
||||
private TrustManagerFactory trustManagerFactory;
|
||||
@Mock
|
||||
private StoreConfig storeConfig;
|
||||
|
||||
private ArgumentCaptor<HttpGeneric> requestCaptor;
|
||||
|
||||
private StoreConfig storeConfig;
|
||||
private WebDavStoreSettings serverSettings;
|
||||
private WebDavStore webDavStore;
|
||||
|
||||
|
@ -88,7 +87,6 @@ public class WebDavStoreTest {
|
|||
when(mockHttpClient.getConnectionManager()).thenReturn(mockClientConnectionManager);
|
||||
when(mockClientConnectionManager.getSchemeRegistry()).thenReturn(mockSchemeRegistry);
|
||||
|
||||
storeConfig = createStoreConfig();
|
||||
serverSettings = createWebDavStoreSettings(ConnectionSecurity.SSL_TLS_REQUIRED);
|
||||
webDavStore = createWebDavStore();
|
||||
}
|
||||
|
@ -338,12 +336,6 @@ public class WebDavStoreTest {
|
|||
};
|
||||
}
|
||||
|
||||
private StoreConfig createStoreConfig() {
|
||||
StoreConfig storeConfig = mock(StoreConfig.class);
|
||||
when(storeConfig.getInboxFolder()).thenReturn("INBOX");
|
||||
return storeConfig;
|
||||
}
|
||||
|
||||
private WebDavStoreSettings createWebDavStoreSettings(ConnectionSecurity connectionSecurity) {
|
||||
return new WebDavStoreSettings(
|
||||
"webdav.example.org",
|
||||
|
|
Loading…
Reference in a new issue