BAEL 1035 - Introduction to Eclipse Collections (#2395)

* 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
This commit is contained in:
Ahmed Tawila
2017-08-10 16:58:22 +03:00
committed by Grzegorz Piwowarek
parent 146b633bac
commit c3de3dbfa9
14 changed files with 423 additions and 1 deletions

View File

@@ -0,0 +1,34 @@
package com.baeldung.eclipsecollections;
import org.eclipse.collections.api.list.MutableList;
import org.eclipse.collections.impl.block.factory.Predicates;
import org.eclipse.collections.impl.list.mutable.FastList;
import static org.junit.Assert.assertEquals;
import org.junit.Before;
import org.junit.Test;
public class DetectPatternTest {
MutableList<Integer> list;
@Before
public void getList() {
this.list = new FastList<>();
list.add(1);
list.add(8);
list.add(5);
list.add(41);
list.add(31);
list.add(17);
list.add(23);
list.add(38);
}
@Test
public void whenDetect_thenCorrect() {
Integer result = list.detect(Predicates.greaterThan(30));
assertEquals((int) result, 41);
}
}