@Test
public void testSetCharacterEncoding_allowsExceptionToPassBack()
throws UnsupportedEncodingException {
final UnsupportedEncodingException expected
= new UnsupportedEncodingException();
mockSubset.setCharacterEncoding(EasyMock.eq(VALUE));
EasyMock.expectLastCall().andThrow(expected);
EasyMock.replay(mockSubset);
try {
adapter.setCharacterEncoding(VALUE);
fail("Should pass exception through");
} catch (UnsupportedEncodingException actual) {
assertThat(actual, sameInstance(expected));
}
EasyMock.verify(mockSubset);
}
HttpServletRequestAdapterTest.java 文件源码
java
阅读 12
收藏 0
点赞 0
评论 0
项目:opengse
作者:
评论列表
文章目录