@Test public void when_templates_are_empty_then_return_empty_list(){ helper.setPatterns(); assertThat(fetcher.collect()).isEmpty(); }
public List<String> collect(){ index = 0; final List<String> templates = new ArrayList<String>(); for(String nextTemplate = getNextTemplate(); !StringUtil.isEmpty(nextTemplate); index++, nextTemplate = getNextTemplate()){ templates.add(nextTemplate); } return templates; }
DnTemplateCollector { public List<String> collect(){ index = 0; final List<String> templates = new ArrayList<String>(); for(String nextTemplate = getNextTemplate(); !StringUtil.isEmpty(nextTemplate); index++, nextTemplate = getNextTemplate()){ templates.add(nextTemplate); } return templates; } }
DnTemplateCollector { public List<String> collect(){ index = 0; final List<String> templates = new ArrayList<String>(); for(String nextTemplate = getNextTemplate(); !StringUtil.isEmpty(nextTemplate); index++, nextTemplate = getNextTemplate()){ templates.add(nextTemplate); } return templates; } DnTemplateCollector(); }
DnTemplateCollector { public List<String> collect(){ index = 0; final List<String> templates = new ArrayList<String>(); for(String nextTemplate = getNextTemplate(); !StringUtil.isEmpty(nextTemplate); index++, nextTemplate = getNextTemplate()){ templates.add(nextTemplate); } return templates; } DnTemplateCollector(); List<String> collect(); }
DnTemplateCollector { public List<String> collect(){ index = 0; final List<String> templates = new ArrayList<String>(); for(String nextTemplate = getNextTemplate(); !StringUtil.isEmpty(nextTemplate); index++, nextTemplate = getNextTemplate()){ templates.add(nextTemplate); } return templates; } DnTemplateCollector(); List<String> collect();  }