public class FtpServer
extends org.junit.rules.ExternalResource
TestRule which starts an EmbeddedFtpServer.
It automatically allocates a dynamic port and exposes the selected port on a system property under a configurable key.
| Modifier and Type | Field and Description |
|---|---|
protected org.mule.tck.junit4.rule.DynamicPort |
dynamicPort |
| Constructor and Description |
|---|
FtpServer(String ftpServerPortName,
File baseDir)
Creates a new instance
|
| Modifier and Type | Method and Description |
|---|---|
org.junit.runners.model.Statement |
apply(org.junit.runners.model.Statement base,
org.junit.runner.Description description) |
protected EmbeddedFtpServer |
createServer() |
int |
getPort() |
void |
start() |
void |
stop() |
public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base,
org.junit.runner.Description description)
apply in interface org.junit.rules.TestRuleapply in class org.junit.rules.ExternalResourcepublic void stop()
protected EmbeddedFtpServer createServer() throws Exception
Exceptionpublic int getPort()
Copyright © 2003–2018 MuleSoft, Inc.. All rights reserved.