blob: 7dc9f29082ff7a54ae48c0492793fe5e33d8cd94 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
/*******************************************************************************
* Copyright (c) 2002 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v0.5
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v05.html
*
* Contributors:
* IBM - Initial API and implementation
******************************************************************************/
package org.eclipse.team.tests.ftp;
import java.net.URL;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.team.internal.ftp.FTPException;
import org.eclipse.team.internal.ftp.client.FTPClient;
import org.eclipse.team.tests.core.TeamTest;
public class ClientTest extends TeamTest {
private static final IProgressMonitor DEFAULT_PROGRESS_MONITOR = new NullProgressMonitor();
/**
* Constructor for ClientTest.
* @param name
*/
public ClientTest(String name) {
super(name);
}
public ClientTest() {
super();
}
public static Test suite() {
TestSuite suite = new TestSuite(ClientTest.class);
return new FTPTestSetup(suite);
//return new FTPTestSetup(new ClientTest("testName"));
}
public URL getURL() {
return FTPTestSetup.ftpURL;
}
public FTPClient openFTPConnection() throws FTPException {
return FTPTestSetup.openFTPConnection(getURL());
}
public void testCreateDirectory() throws FTPException {
FTPClient client = openFTPConnection();
try {
client.createDirectory("test1", DEFAULT_PROGRESS_MONITOR);
} finally {
client.close(DEFAULT_PROGRESS_MONITOR);
}
}
}
|