* Evaluation article: Different Types of Bean Injection in Spring * added tests & changed configuration to Java-based config * removed xml config files * rename unit tests * BAEL-972 - Apache Commons Text * remove code from evaluation article * remove code from evaluation article * BAEL-972 - Apache Commons Text - added another example * BAEL-972 - Apache Commons Text - just indentation * BAEL-994 - TemporalAdjuster in Java * BAEL-994 - TemporalAdjuster in Java * BAEL-994 - TemporalAdjuster in Java * BAEL-994 - TemporalAdjuster in Java * BAEL-994 - TemporalAdjuster in Java - fix problems * BAEL-1033 Introduction to StreamUtils * BAEL-1033 Introduction to StreamUtils * BAEL-1033 Introduction to StreamUtils * fix formatting * BAEL-1033 minor refactor * BAEL-1035 Introduction to Eclipse Collections * format * BAEL-1035 Introduction to Eclipse Collections
24 lines
555 B
Java
24 lines
555 B
Java
package com.baeldung.eclipsecollections;
|
|
|
|
import static org.junit.Assert.assertEquals;
|
|
|
|
import java.util.List;
|
|
|
|
import org.eclipse.collections.impl.factory.Lists;
|
|
import org.junit.Test;
|
|
|
|
public class InjectIntoPatternTest {
|
|
|
|
@Test
|
|
public void whenInjectInto_thenCorrect() {
|
|
List<Integer> list = Lists.mutable.of(1, 2, 3, 4);
|
|
int result = 5;
|
|
for (int i = 0; i < list.size(); i++) {
|
|
Integer v = list.get(i);
|
|
result = result + v.intValue();
|
|
}
|
|
|
|
assertEquals(15, result);
|
|
}
|
|
}
|