AllReplacement extends AbstractReplacement { @Override public List<ReplaceEntity> getReplacements(ScriptStep step, String searchQuery, String replaceString, SearchMode searchMode) { Collection<AbstractReplacement> values = ReplacementFactory.getReplacementSections(); List<ReplaceEntity> list = new ArrayList<ReplaceEntity>(); for (AbstractReplacement replacement : values) { if (!ScriptConstants.AGGREGATE.equals(replacement.getType())) { list.addAll(replacement.getReplacements(step, searchQuery, replaceString, searchMode)); } } return list; } protected  AllReplacement(); @Override List<ReplaceEntity> getReplacements(ScriptStep step, String searchQuery, String replaceString,
            SearchMode searchMode); @Override void replace(ScriptStep step, String replaceString, String key, ReplaceMode replaceMode);  }
@Test public void testGetReplacements_1() throws Exception { AllReplacement fixture = new AllReplacement(); ScriptStep step = new ScriptStep(); String searchQuery = ""; String replaceString = ""; SearchMode searchMode = SearchMode.all; List<ReplaceEntity> result = fixture.getReplacements(step, searchQuery, replaceString, searchMode); assertNotNull(result); assertEquals(0, result.size()); }
@Test public void testGetReplacements_2() throws Exception { AllReplacement fixture = new AllReplacement(); ScriptStep step = new ScriptStep(); String searchQuery = ""; String replaceString = ""; SearchMode searchMode = SearchMode.all; List<ReplaceEntity> result = fixture.getReplacements(step, searchQuery, replaceString, searchMode); assertNotNull(result); assertEquals(0, result.size()); }
@Test public void testGetReplacements_3() throws Exception { AllReplacement fixture = new AllReplacement(); ScriptStep step = new ScriptStep(); String searchQuery = ""; String replaceString = ""; SearchMode searchMode = SearchMode.all; List<ReplaceEntity> result = fixture.getReplacements(step, searchQuery, replaceString, searchMode); assertNotNull(result); assertEquals(0, result.size()); }