1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-30 05:02:26 -05:00

Initialize settings in setUp()

This commit is contained in:
Jan Berkel 2015-01-13 10:05:15 +01:00
parent f7da704007
commit e98f323222

View File

@ -20,12 +20,13 @@ public class ImapConnectionTest extends TestCase {
private StubMailServer stubMailServer;
private ImapConnection connection;
private TestImapSettings settings = new TestImapSettings(UserForImap.TEST_USER);
private TestImapSettings settings;
@Override
public void setUp() throws Exception {
super.setUp();
stubMailServer = new StubMailServer();
settings = new TestImapSettings(UserForImap.TEST_USER);
connection = new ImapConnection(settings, null, null);
}
@ -46,6 +47,10 @@ public class ImapConnectionTest extends TestCase {
}
}
public void testConnectionIsInitiallyClosed() throws Exception {
assertFalse(connection.isOpen());
}
public void testSuccessfulOpenConnectionTogglesOpenState() throws Exception {
connection.open();
assertTrue(connection.isOpen());