use of org.codelibs.fess.es.config.exentity.PathMapping in project fess by codelibs.
the class PathMappingHelperTest method test_replaceUrl.
public void test_replaceUrl() {
final String sessionId = "test";
final List<PathMapping> pathMappingList = new ArrayList<PathMapping>();
final PathMapping pathMapping = new PathMapping();
pathMapping.setRegex("file:///home/");
pathMapping.setReplacement("http://localhost/");
pathMappingList.add(pathMapping);
pathMappingHelper.setPathMappingList(sessionId, pathMappingList);
final String url = "file:///home/user/";
assertEquals("http://localhost/user/", pathMappingHelper.replaceUrl(sessionId, url));
}
Aggregations