mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-27 11:42:16 -05:00
Initialize settings in setUp()
This commit is contained in:
parent
f7da704007
commit
e98f323222
@ -17,15 +17,16 @@ import static org.junit.Assert.assertArrayEquals;
|
|||||||
|
|
||||||
public class ImapConnectionTest extends TestCase {
|
public class ImapConnectionTest extends TestCase {
|
||||||
private static final String[] CAPABILITIES = new String[] { "IMAP4REV1", "LITERAL+", "QUOTA" };
|
private static final String[] CAPABILITIES = new String[] { "IMAP4REV1", "LITERAL+", "QUOTA" };
|
||||||
|
|
||||||
private StubMailServer stubMailServer;
|
private StubMailServer stubMailServer;
|
||||||
private ImapConnection connection;
|
private ImapConnection connection;
|
||||||
private TestImapSettings settings = new TestImapSettings(UserForImap.TEST_USER);
|
private TestImapSettings settings;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setUp() throws Exception {
|
public void setUp() throws Exception {
|
||||||
super.setUp();
|
super.setUp();
|
||||||
stubMailServer = new StubMailServer();
|
stubMailServer = new StubMailServer();
|
||||||
|
settings = new TestImapSettings(UserForImap.TEST_USER);
|
||||||
connection = new ImapConnection(settings, null, null);
|
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 {
|
public void testSuccessfulOpenConnectionTogglesOpenState() throws Exception {
|
||||||
connection.open();
|
connection.open();
|
||||||
assertTrue(connection.isOpen());
|
assertTrue(connection.isOpen());
|
||||||
|
Loading…
Reference in New Issue
Block a user