Skip to content

Commit 00d83f9

Browse files
author
Tomasz Lelek
committed
BAEL-602 create JOOL module, one test case
1 parent 5f0f26e commit 00d83f9

3 files changed

Lines changed: 76 additions & 0 deletions

File tree

‎jooq/pom.xml‎

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<parent>
6+
<artifactId>parent-modules</artifactId>
7+
<groupId>com.baeldung</groupId>
8+
<version>1.0.0-SNAPSHOT</version>
9+
</parent>
10+
<modelVersion>4.0.0</modelVersion>
11+
12+
<artifactId>jooq</artifactId>
13+
<build>
14+
<plugins>
15+
<plugin>
16+
<groupId>org.apache.maven.plugins</groupId>
17+
<artifactId>maven-compiler-plugin</artifactId>
18+
<configuration>
19+
<source>1.8</source>
20+
<target>1.8</target>
21+
</configuration>
22+
</plugin>
23+
</plugins>
24+
</build>
25+
26+
<dependencies>
27+
<dependency>
28+
<groupId>org.jooq</groupId>
29+
<artifactId>jool</artifactId>
30+
<version>${jool.version}</version>
31+
</dependency>
32+
<dependency>
33+
<groupId>junit</groupId>
34+
<artifactId>junit</artifactId>
35+
<version>${junit.version}</version>
36+
<scope>test</scope>
37+
</dependency>
38+
</dependencies>
39+
40+
<properties>
41+
<jool.version>0.9.12</jool.version>
42+
<junit.version>4.12</junit.version>
43+
</properties>
44+
45+
46+
</project>
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
package com.baeldung;
2+
3+
4+
import org.jooq.lambda.Seq;
5+
import org.junit.Test;
6+
7+
import java.util.Arrays;
8+
import java.util.List;
9+
10+
import static junit.framework.Assert.assertTrue;
11+
import static junit.framework.TestCase.assertEquals;
12+
13+
public class JOOLTest {
14+
@Test
15+
public void givenSeq_whenCheckContains_shouldReturnTrue() {
16+
List<Integer> concat = Seq.of(1, 2, 3).concat(Seq.of(4, 5, 6)).toList();
17+
18+
assertEquals(concat, Arrays.asList(1, 2, 3, 4, 5, 6));
19+
20+
21+
assertTrue(Seq.of(1, 2, 3, 4).contains(2));
22+
23+
24+
assertTrue(Seq.of(1, 2, 3, 4).containsAll(2, 3));
25+
26+
27+
assertTrue(Seq.of(1, 2, 3, 4).containsAny(2, 5));
28+
}
29+
}

‎pom.xml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@
193193

194194
<module>struts2</module>
195195
<module>apache-velocity</module>
196+
<module>jooq</module>
196197

197198

198199
</modules>

0 commit comments

Comments
 (0)