reformat the files using intellij-baeldung-style.xml
This commit is contained in:
parent
4bdfd9699f
commit
a1e28048a6
|
@ -8,6 +8,7 @@ import java.util.Collections;
|
|||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.Arguments;
|
||||
|
@ -16,11 +17,7 @@ import org.junit.jupiter.params.provider.MethodSource;
|
|||
class IteratorVsForeachUnitTest {
|
||||
|
||||
private static Stream<Arguments> listProvider() {
|
||||
return Stream.of(
|
||||
Arguments.of(
|
||||
List.of("String1", "String2", "unwanted"),
|
||||
List.of("String1", "String2"))
|
||||
);
|
||||
return Stream.of(Arguments.of(List.of("String1", "String2", "unwanted"), List.of("String1", "String2")));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -33,8 +30,7 @@ class IteratorVsForeachUnitTest {
|
|||
|
||||
@ParameterizedTest
|
||||
@MethodSource("listProvider")
|
||||
public void givenCollectionWithElements_whenRemovingElementDuringForEachIteration_thenElementIsRemoved(
|
||||
List<String> input, List<String> expected) {
|
||||
public void givenCollectionWithElements_whenRemovingElementDuringForEachIteration_thenElementIsRemoved(List<String> input, List<String> expected) {
|
||||
List<String> mutableList = new ArrayList<>(input);
|
||||
// Separate collection for items to be removed
|
||||
List<String> toRemove = new ArrayList<>();
|
||||
|
@ -53,8 +49,7 @@ class IteratorVsForeachUnitTest {
|
|||
|
||||
@ParameterizedTest
|
||||
@MethodSource("listProvider")
|
||||
public void givenCollectionWithElements_whenRemovingElementDuringIteratorIteration_thenElementIsRemoved(
|
||||
List<String> input, List<String> expected) {
|
||||
public void givenCollectionWithElements_whenRemovingElementDuringIteratorIteration_thenElementIsRemoved(List<String> input, List<String> expected) {
|
||||
List<String> mutableList = new ArrayList<>(input);
|
||||
Iterator<String> it = mutableList.iterator();
|
||||
while (it.hasNext()) {
|
||||
|
|
Loading…
Reference in New Issue