From e98f32322290e11714309b0c707ba33a453241e5 Mon Sep 17 00:00:00 2001 From: Jan Berkel Date: Tue, 13 Jan 2015 10:05:15 +0100 Subject: [PATCH] Initialize settings in setUp() --- .../com/fsck/k9/mail/store/imap/ImapConnectionTest.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/k9mail/src/androidTest/java/com/fsck/k9/mail/store/imap/ImapConnectionTest.java b/k9mail/src/androidTest/java/com/fsck/k9/mail/store/imap/ImapConnectionTest.java index 73a3e364a..b10705e06 100644 --- a/k9mail/src/androidTest/java/com/fsck/k9/mail/store/imap/ImapConnectionTest.java +++ b/k9mail/src/androidTest/java/com/fsck/k9/mail/store/imap/ImapConnectionTest.java @@ -17,15 +17,16 @@ import static org.junit.Assert.assertArrayEquals; public class ImapConnectionTest extends TestCase { private static final String[] CAPABILITIES = new String[] { "IMAP4REV1", "LITERAL+", "QUOTA" }; - + 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());