reformat the files using intellij-baeldung-style.xml

This commit is contained in:
hajk1 2024-04-07 18:25:13 +03:30
parent fc31ffd062
commit 2a754ad337
2 changed files with 90 additions and 95 deletions

View File

@ -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()) {