@Test public void testAddArrayList() { System.out.println("addArrayList"); ArrayList<String> arrayList = new ArrayList<>(); arrayList.add("2"); arrayList.add("3"); arrayList.add("test"); CodeArrayListBeautifier instance = new CodeArrayListBeautifier(); instance.addArrayList(arrayList); ArrayList<String> resultList = instance.getCodeArrayList(); if (resultList.size() == arrayList.size()) { for (int i = 0; i < arrayList.size(); i++) { assertEquals(resultList.get(i), arrayList.get(i)); } } else { fail("The ArrayLists are of a different size"); } instance.addArrayList(null); }
public void addArrayList(List<String> arrayList) { if (arrayList != null) { arrayList.forEach((singleItem) -> { this.add(singleItem); }); } }
CodeArrayListBeautifier { public void addArrayList(List<String> arrayList) { if (arrayList != null) { arrayList.forEach((singleItem) -> { this.add(singleItem); }); } } }
CodeArrayListBeautifier { public void addArrayList(List<String> arrayList) { if (arrayList != null) { arrayList.forEach((singleItem) -> { this.add(singleItem); }); } } CodeArrayListBeautifier(); }
CodeArrayListBeautifier { public void addArrayList(List<String> arrayList) { if (arrayList != null) { arrayList.forEach((singleItem) -> { this.add(singleItem); }); } } CodeArrayListBeautifier(); void add(String addedString); void addTab(); void deleteTab(); ArrayList<String> getCodeArrayList(); void addArrayList(List<String> arrayList); void addAll(List<String> votingResultCode); }
CodeArrayListBeautifier { public void addArrayList(List<String> arrayList) { if (arrayList != null) { arrayList.forEach((singleItem) -> { this.add(singleItem); }); } } CodeArrayListBeautifier(); void add(String addedString); void addTab(); void deleteTab(); ArrayList<String> getCodeArrayList(); void addArrayList(List<String> arrayList); void addAll(List<String> votingResultCode);  }