Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 58 additions & 54 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

<modelVersion>4.0.0</modelVersion>
<groupId>org.gitlab4j</groupId>
Expand Down Expand Up @@ -50,13 +52,14 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<jersey.version>2.30.1</jersey.version>
<jackson.version>2.10.3</jackson.version>
<servlet.version>4.0.3</servlet.version>
<jersey.version>2.34</jersey.version>
<jackson.version>2.12.4</jackson.version>
<servlet.version>4.0.4</servlet.version>
<activation.version>1.2.2</activation.version>

<junit.version>5.6.0</junit.version>
<mockito.version>3.3.0</mockito.version>
<junit.version>5.8.2</junit.version>
<testcontainers.version>1.15.3</testcontainers.version>
<mockito.version>4.1.0</mockito.version>
<hamcrest.version>1.3</hamcrest.version>
<systemRules.version>1.19.0</systemRules.version>

Expand All @@ -67,7 +70,7 @@
<gitlab.autoremove-container>true</gitlab.autoremove-container>
<gitlab.skip-docker-start>true</gitlab.skip-docker-start>
<gitlab.port>8090</gitlab.port>

<sonar.projectKey>gitlab4j_gitlab4j-api</sonar.projectKey>
<sonar.organization>gitlab4j</sonar.organization>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
Expand Down Expand Up @@ -121,15 +124,15 @@
</plugin>

<plugin>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>bnd-process</goal>
</goals>
</execution>
</executions>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>bnd-process</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
Expand Down Expand Up @@ -179,20 +182,20 @@
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
</archive>
</configuration>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
</archive>
</configuration>
</plugin>

<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.3</version>
<version>0.8.7</version>
<executions>
<execution>
<id>default-prepare-agent</id>
Expand Down Expand Up @@ -235,23 +238,24 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M3</version>
<version>3.0.0-M5</version>
<configuration>
<excludedGroups>org.gitlab4j.api.IntegrationTest</excludedGroups>
<systemPropertyVariables>
<jacoco-agent.destfile>target/jacoco.exec</jacoco-agent.destfile>
</systemPropertyVariables>
<excludedGroups>integration</excludedGroups>
</configuration>
</plugin>


<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.0.0-M3</version>
<version>3.0.0-M5</version>
<configuration>
<groups>org.gitlab4j.api.IntegrationTest</groups>
<groups>integration</groups>
<includes>
<include>**/IntegrationTestSuite.java</include>
<include>**/*.java</include>
</includes>
</configuration>
<executions>
Expand Down Expand Up @@ -290,15 +294,15 @@
<dependency>
<groupId>org.codehaus.mojo</groupId>
<artifactId>extra-enforcer-rules</artifactId>
<version>1.2</version>
<version>1.3</version>
</dependency>
</dependencies>
</plugin>

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
<version>1.17</version>
<version>1.20</version>
<executions>
<execution>
<goals>
Expand Down Expand Up @@ -327,7 +331,8 @@
<run>
<skip>${gitlab.skip-docker-start}</skip>
<env>
<GITLAB_OMNIBUS_CONFIG>gitlab_rails['initial_root_password']="password"; gitlab_rails['lfs_enabled']=false;</GITLAB_OMNIBUS_CONFIG>
<GITLAB_OMNIBUS_CONFIG>gitlab_rails['initial_root_password']="password";
gitlab_rails['lfs_enabled']=false;</GITLAB_OMNIBUS_CONFIG>
</env>
<ports>
<port>${gitlab.port}:80</port>
Expand Down Expand Up @@ -358,12 +363,12 @@
</execution>
</executions>
</plugin>

</plugins>

<pluginManagement>
<plugins>
<!-- The se.bjurr.gitchangelog:git-changelog-maven-plugin needs to be in -->
<!-- The se.bjurr.gitchangelog:git-changelog-maven-plugin needs to be
in -->
<!-- this section (pluginManagement) for it to work correctly. -->
<plugin>
<groupId>se.bjurr.gitchangelog</groupId>
Expand All @@ -382,14 +387,14 @@
</executions>
</plugin>
<plugin>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-maven-plugin</artifactId>
<version>${bnd.version}</version>
<configuration>
<bnd><![CDATA[
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-maven-plugin</artifactId>
<version>${bnd.version}</version>
<configuration>
<bnd><![CDATA[
Export-Package: org.gitlab4j.api.*
]]></bnd>
</configuration>
</configuration>
</plugin>
</plugins>
</pluginManagement>
Expand Down Expand Up @@ -435,8 +440,8 @@
</dependency>

<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
Expand All @@ -447,28 +452,27 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>${hamcrest.version}</version>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.stefanbirkner</groupId>
<artifactId>system-rules</artifactId>
<version>${systemRules.version}</version>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>${hamcrest.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.googlecode.junit-toolbox</groupId>
<artifactId>junit-toolbox</artifactId>
<version>2.4</version>
<scope>test</scope>
<groupId>uk.org.webcompere</groupId>
<artifactId>system-stubs-jupiter</artifactId>
<version>1.2.0</version>
</dependency>
</dependencies>

<dependencyManagement>
<dependencies>
<!-- Needed for animal-sniffer -->
<!-- Needed for animal-sniffer -->
<dependency>
<groupId>org.codehaus.mojo.signature</groupId>
<artifactId>java18</artifactId>
Expand Down
22 changes: 0 additions & 22 deletions src/test/java/org/gitlab4j/api/IntegrationTest.java

This file was deleted.

32 changes: 16 additions & 16 deletions src/test/java/org/gitlab4j/api/PagerSpliteratorTest.java
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
package org.gitlab4j.api;

import static java.util.Arrays.asList;
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assertions.fail;
import static org.mockito.Mockito.when;

import java.util.Collections;
import java.util.stream.StreamSupport;

import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnitRunner;
import org.mockito.junit.jupiter.MockitoExtension;

import static java.util.Arrays.asList;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.when;

@RunWith(MockitoJUnitRunner.class)
@ExtendWith(MockitoExtension.class)
public class PagerSpliteratorTest {

PagerSpliterator<Integer> pagerSpliterator;

@Mock
Pager<Integer> pager;

@Before
@BeforeEach
public void setUp() {
pagerSpliterator = new PagerSpliterator<>(pager);
}
Expand All @@ -46,7 +46,7 @@ public void shouldDoNotFailOnEmptySource() {

assertFalse(success);
}

@Test
public void shouldReturnFalseIfNextPagerItemMissing() {
when(pager.hasNext()).thenReturn(true);
Expand All @@ -61,7 +61,7 @@ public void shouldReturnFalseIfNextPagerItemMissing() {
public void shouldThrowNullPointerExceptionWhenActionIsMissing() {
try {
pagerSpliterator.tryAdvance(null);
Assert.fail("Missing NullPointerException");
fail("Missing NullPointerException");
} catch (Throwable e) {
assertEquals(NullPointerException.class, e.getClass());
}
Expand Down
Loading