use of com.att.aro.core.searching.pojo.SearchingResult in project VideoOptimzer by attdevsupport.
the class KeywordSearchingHandlerTest method testMultiSearchingPattern.
@Test
public void testMultiSearchingPattern() {
SearchingPatternBuilder patternBuilder = new SearchingPatternBuilder();
patternBuilder.add("abc", PrivateDataType.regex_credit_card_number.name()).add("bcd", PrivateDataType.regex_credit_card_number.name()).add("def", PrivateDataType.regex_credit_card_number.name());
SearchingContent content = new SearchingContent("abcde");
SearchingResult result = searchingHandler.search(patternBuilder.build(), content);
assertNotNull(result);
assertEquals(2, result.getWords().size());
}
use of com.att.aro.core.searching.pojo.SearchingResult in project VideoOptimzer by attdevsupport.
the class KeywordSearchingHandlerTest method testUnknownSearchingPattern.
@Test
public void testUnknownSearchingPattern() {
SearchingPattern pattern = null;
SearchingContent content = new SearchingContent("abcde");
SearchingResult result = searchingHandler.search(pattern, content);
assertNotNull(result);
assertEquals(0, result.getWords().size());
}
use of com.att.aro.core.searching.pojo.SearchingResult in project VideoOptimzer by attdevsupport.
the class KeywordSearchingHandlerTest method testSingleSearchingPattern.
@Test
public void testSingleSearchingPattern() {
SearchingPatternBuilder patternBuilder = new SearchingPatternBuilder();
patternBuilder.add("abc", PrivateDataType.regex_credit_card_number.name());
SearchingContent content = new SearchingContent("abcde");
SearchingResult result = searchingHandler.search(patternBuilder.build(), content);
assertNotNull(result);
assertEquals("abc", result.getWords().get(0));
}
use of com.att.aro.core.searching.pojo.SearchingResult in project VideoOptimzer by attdevsupport.
the class PatternSearchingHandlerTest method testUnknownSearchingPattern.
@Test
public void testUnknownSearchingPattern() {
SearchingPattern pattern = null;
SearchingContent content = new SearchingContent("abcde");
SearchingResult result = searchingHandler.search(pattern, content);
assertNotNull(result);
assertEquals(0, result.getWords().size());
}
use of com.att.aro.core.searching.pojo.SearchingResult in project VideoOptimzer by attdevsupport.
the class PatternSearchingHandlerTest method testEmptyContent.
@Test
public void testEmptyContent() {
SearchingPatternBuilder pattenBuilder = new SearchingPatternBuilder();
pattenBuilder.add("\\d{3}[-\\.\\s]\\d{3}[-\\.\\s]\\d{4},-,3,8,-,7,4", PrivateDataType.regex_phone_number.name());
SearchingContent content = new SearchingContent(null);
SearchingResult result = searchingHandler.search(pattenBuilder.build(), content);
assertNotNull(result);
assertEquals(0, result.getWords().size());
}
Aggregations