public void testGetRealPathInterpretsLocationAsRelativeToWebAppRootIfPathDoesNotBeginWithALeadingSlash() throws Exception {
final String originalPath = "web/foo";
final String expectedRealPath = "/" + originalPath;
PortletContext ctx = mock(PortletContext.class);
given(ctx.getRealPath(expectedRealPath)).willReturn(expectedRealPath);
String actualRealPath = PortletUtils.getRealPath(ctx, originalPath);
assertEquals(expectedRealPath, actualRealPath);
verify(ctx);
}
PortletUtilsTests.java 文件源码
java
阅读 25
收藏 0
点赞 0
评论 0
项目:spring4-understanding
作者:
评论列表
文章目录