public void testGetEntryInvalidUrl() throws Exception {
// Setup
URL badUrl = new URL("http://badUrl");
String errorMsg = "invalid URL";
EasyMock.expect(mockService.getEntry(badUrl, FeedServerEntry.class)).andThrow(
new IOException(errorMsg));
EasyMock.replay(mockService);
// Perform Test
try {
feedServerClient.getEntity(badUrl);
} catch (FeedServerClientException e) {
assertTrue(e.getCause().getMessage().equals(errorMsg));
EasyMock.verify(mockService);
return;
}
fail("Did not get FeedServerClientException");
}
FeedServerClientTest.java 文件源码
java
阅读 13
收藏 0
点赞 0
评论 0
项目:google-feedserver
作者:
评论列表
文章目录