Created
August 1, 2011 03:25
-
-
Save svacas/1117522 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RunWith(BMUnitRunner.class) | |
public class FtpErrorTestCase extends AbstractFtpServerTestCase | |
{ | |
@Override | |
protected String getConfigResources() | |
{ | |
return "ftp-message-requester-test.xml"; | |
} | |
@BMRule(name = "throw ftp exception", | |
targetClass = "FTPClient", | |
targetMethod = "retrieveFile(String, OutputStream)", | |
condition = "true", | |
action = "throw new org.apache.commons.net.ftp.FTPConnectionClosedException(\"by byteman\")") | |
@Test(expected = MuleException.class) | |
public void testFtpServiceNotAvailable() throws Exception | |
{ | |
createFileOnFtpServer("test.txt"); | |
MuleClient client = new MuleClient(muleContext); | |
client.request(getMuleFtpEndpoint(), getTimeout()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment