diff --git a/tests/uris/ftp.cpp b/tests/uris/ftp.cpp index 0f07e86d8d..5a38c56aa9 100644 --- a/tests/uris/ftp.cpp +++ b/tests/uris/ftp.cpp @@ -94,6 +94,8 @@ void FTPTestCase::setUp() m_ftp->SetUser(user); m_ftp->SetPassword(password); #endif // FTP_ANONYMOUS/!FTP_ANONYMOUS + + CPPUNIT_ASSERT( m_ftp->Connect(hostname) ); } void FTPTestCase::tearDown() @@ -105,8 +107,6 @@ void FTPTestCase::tearDown() void FTPTestCase::List() { - CPPUNIT_ASSERT( m_ftp->Connect(hostname) ); - // test CWD CPPUNIT_ASSERT( m_ftp->ChDir(directory) ); @@ -120,7 +120,6 @@ void FTPTestCase::List() void FTPTestCase::Download() { - CPPUNIT_ASSERT( m_ftp->Connect(hostname) ); CPPUNIT_ASSERT( m_ftp->ChDir(directory) ); // test RETR @@ -141,8 +140,6 @@ void FTPTestCase::Download() void FTPTestCase::FileSize() { - CPPUNIT_ASSERT( m_ftp->Connect(hostname) ); - CPPUNIT_ASSERT( m_ftp->ChDir(directory) ); CPPUNIT_ASSERT( m_ftp->FileExists(valid_filename) ); @@ -153,7 +150,6 @@ void FTPTestCase::FileSize() void FTPTestCase::Misc() { - CPPUNIT_ASSERT( m_ftp->Connect(hostname) ); CPPUNIT_ASSERT( m_ftp->SendCommand(wxT("STAT")) == '2' ); CPPUNIT_ASSERT( m_ftp->SendCommand(wxT("HELP SITE")) == '2' ); @@ -162,8 +158,6 @@ void FTPTestCase::Misc() #ifndef FTP_ANONYMOUS void FTPTestCase::Upload() { - CPPUNIT_ASSERT( m_ftp->Connect(hostname) ); - // upload a file static const wxChar *file1 = wxT("test1"); wxOutputStream *out = m_ftp->GetOutputStream(file1);