Cyberduck Mountain Duck CLI

Changeset 11452


Ignore:
Timestamp:
Jun 28, 2013 8:45:45 AM (7 years ago)
Author:
dkocher
Message:

Add tests.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/ch/cyberduck/core/ftp/FTPSessionTest.java

    r11355 r11452  
    99import ch.cyberduck.core.Preferences;
    1010import ch.cyberduck.core.Protocol;
     11import ch.cyberduck.core.Session;
    1112import ch.cyberduck.core.exception.LoginFailureException;
    1213import ch.cyberduck.core.threading.BackgroundException;
     
    2728        ));
    2829        final FTPSession session = new FTPSession(host);
     30        assertEquals(Session.State.closed, session.getState());
    2931        assertNotNull(session.open());
     32        assertEquals(Session.State.open, session.getState());
    3033        assertTrue(session.isConnected());
    3134        assertNotNull(session.getClient());
     
    3437        assertTrue(session.isConnected());
    3538        session.close();
     39        assertEquals(Session.State.closed, session.getState());
    3640        assertNull(session.getClient());
    3741        assertFalse(session.isConnected());
     
    8185            @Override
    8286            protected void warn(final LoginController login) throws BackgroundException {
     87                assertEquals(Session.State.open, this.getState());
    8388                super.warn(login);
    8489                assertEquals(Protocol.FTP_TLS, host.getProtocol());
Note: See TracChangeset for help on using the changeset viewer.
swiss made software