use of org.codelibs.fess.crawler.entity.AccessResultDataImpl in project fess-crawler by codelibs.
the class FileTransformerTest method test_getData_nullData.
public void test_getData_nullData() throws Exception {
final AccessResultDataImpl accessResultDataImpl = new AccessResultDataImpl();
accessResultDataImpl.setData(null);
accessResultDataImpl.setEncoding(Constants.UTF_8);
accessResultDataImpl.setTransformerName("fileTransformer");
setBaseDir();
final Object obj = fileTransformer.getData(accessResultDataImpl);
assertNull(obj);
}
use of org.codelibs.fess.crawler.entity.AccessResultDataImpl in project fess-crawler by codelibs.
the class HtmlTransformerTest method test_getData_wrongName.
public void test_getData_wrongName() throws Exception {
final String value = "<html><body>hoge</body></html>";
final AccessResultDataImpl accessResultDataImpl = new AccessResultDataImpl();
accessResultDataImpl.setData(value.getBytes());
accessResultDataImpl.setEncoding(Constants.UTF_8);
accessResultDataImpl.setTransformerName("transformer");
try {
htmlTransformer.getData(accessResultDataImpl);
fail();
} catch (final CrawlerSystemException e) {
}
}
use of org.codelibs.fess.crawler.entity.AccessResultDataImpl in project fess-crawler by codelibs.
the class HtmlTransformerTest method test_getData_nullData.
public void test_getData_nullData() throws Exception {
final AccessResultDataImpl accessResultDataImpl = new AccessResultDataImpl();
accessResultDataImpl.setData(null);
accessResultDataImpl.setEncoding(Constants.UTF_8);
accessResultDataImpl.setTransformerName("htmlTransformer");
final Object obj = htmlTransformer.getData(accessResultDataImpl);
assertNull(obj);
}
use of org.codelibs.fess.crawler.entity.AccessResultDataImpl in project fess-crawler by codelibs.
the class TextTransformerTest method test_getData_wrongName.
public void test_getData_wrongName() throws Exception {
final AccessResultDataImpl accessResultData = new AccessResultDataImpl();
accessResultData.setTransformerName("transformer");
accessResultData.setData("xyz".getBytes());
try {
textTransformer.getData(accessResultData);
fail();
} catch (final CrawlerSystemException e) {
}
}
use of org.codelibs.fess.crawler.entity.AccessResultDataImpl in project fess-crawler by codelibs.
the class TextTransformerTest method test_getData.
public void test_getData() throws Exception {
final AccessResultDataImpl accessResultData = new AccessResultDataImpl();
accessResultData.setTransformerName("textTransformer");
accessResultData.setData("xyz".getBytes());
final Object obj = textTransformer.getData(accessResultData);
assertNotNull(obj);
assertTrue(obj instanceof String);
assertEquals("xyz", obj.toString());
}
Aggregations