Skip to content

Commit 3d18e63

Browse files
Merge pull request #33 from eliasnogueira/latest-updates
Latest updates
2 parents 453d746 + 4a4215d commit 3d18e63

File tree

7 files changed

+93
-51
lines changed

7 files changed

+93
-51
lines changed

.github/workflows/test-execution.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ jobs:
2323
- 8088:8088
2424
steps:
2525
- uses: actions/checkout@v4
26-
- name: Set up JDK 24
26+
- name: Set up JDK 25
2727
uses: actions/setup-java@v4
2828
with:
29-
java-version: 24
29+
java-version: 25
3030
distribution: temurin
3131

3232
- name: Cache Maven packages

CHANGELOG.md

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,48 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [2.7.0] - 04-01-2026
9+
10+
### Changed
11+
12+
- Adoption of Java 25
13+
- Set `java.version` to 25
14+
- Changed `actions/setup-java@v4` in `.github/workflows/test-execution.yml` to Java 25
15+
- Renamed `MessageFormat` to `LocationUrlResolver` and updated usages
16+
- Updated CPF generation to avoid deprecated DataFaker API
17+
- Updated the following dependencies
18+
- `maven-compiler-plugin.version -> 3.14.1`
19+
- `maven-surefire-plugin.version -> 3.5.4`
20+
- `restassured.version -> 6.0.0`
21+
- `junit.jupiter.version -> 6.0.1`
22+
- `assertj.version -> 3.27.6`
23+
- `datafaker.version -> 2.5.3`
24+
- `log4j.version -> 2.25.3`
25+
- `slf4j.version -> 2.0.17`
26+
- `allure.version -> 2.32.0`
27+
- `allure-maven.version -> 2.17.0`
28+
- `aspectj.version -> 1.9.25.1`
29+
- `commons-codec.version -> 1.20.0`
30+
- `jackson-databind.version -> 3.0.3`
31+
- `rhino.version -> 1.9.0`
32+
- Added `junit-platform-launcher` (test scope)
33+
- Removed `allure-testng`
34+
835
## [2.6.0] - 21-03-2024
936

1037
### Changed
1138

1239
- Updated the following dependencies
13-
- `maven-surefire-plugin -> 3.5.3`
40+
- `maven-surefire-plugin -> 3.5.3`
1441

1542
## [2.5.0] - 21-03-2024
1643

1744
### Changed
1845

1946
- Adoption of Java 24
2047
- Updated the following dependencies
21-
- `restassured -> 5.5.1`
22-
- `aspectj -> 1.9.23`
48+
- `restassured -> 5.5.1`
49+
- `aspectj -> 1.9.23`
2350

2451
## [2.4.4] - 17-12-2024
2552

pom.xml

Lines changed: 51 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -6,35 +6,56 @@
66

77
<groupId>com.eliasogueira.credit</groupId>
88
<artifactId>restassured-complete-basic-example</artifactId>
9-
<version>2.6.0</version>
9+
<version>2.7.0</version>
1010

1111
<properties>
12-
<java.version>24</java.version>
12+
<java.version>25</java.version>
1313
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1414
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
15-
<maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
16-
<maven-surefire-plugin.version>3.5.3</maven-surefire-plugin.version>
15+
<maven-compiler-plugin.version>3.14.1</maven-compiler-plugin.version>
16+
<maven-surefire-plugin.version>3.5.4</maven-surefire-plugin.version>
1717
<maven-failsafe-plugin.version>3.2.5</maven-failsafe-plugin.version>
1818

19-
<restassured.version>5.5.1</restassured.version>
20-
<junit.jupiter.version>5.11.4</junit.jupiter.version>
21-
<assertj.version>3.26.3</assertj.version>
22-
<datafaker.version>2.4.2</datafaker.version>
19+
<restassured.version>6.0.0</restassured.version>
20+
<junit.jupiter.version>6.0.1</junit.jupiter.version>
21+
<assertj.version>3.27.6</assertj.version>
22+
<datafaker.version>2.5.3</datafaker.version>
2323
<owner.version>1.0.12</owner.version>
24-
<log4j.version>2.23.1</log4j.version>
25-
<slf4j.version>2.0.13</slf4j.version>
26-
<allure.version>2.29.1</allure.version>
27-
<allure-maven.version>2.15.2</allure-maven.version>
28-
<aspectj.version>1.9.23</aspectj.version>
24+
<log4j.version>2.25.3</log4j.version>
25+
<slf4j.version>2.0.17</slf4j.version>
26+
<allure.version>2.32.0</allure.version>
27+
<allure-maven.version>2.17.0</allure-maven.version>
28+
<aspectj.version>1.9.25.1</aspectj.version>
2929
<allure.cmd.download.url>
3030
https://repo.maven.apache.org/maven2/io/qameta/allure/allure-commandline
3131
</allure.cmd.download.url>
3232

3333
<!-- override vulnerable dependencies -->
34+
<commons-codec.version>1.20.0</commons-codec.version>
3435
<jackson-databind.version>2.18.3</jackson-databind.version>
36+
<rhino.version>1.9.0</rhino.version>
3537
</properties>
3638

3739
<dependencies>
40+
<!-- override vulnerable dependencies -->
41+
<dependency>
42+
<groupId>commons-codec</groupId>
43+
<artifactId>commons-codec</artifactId>
44+
<version>${commons-codec.version}</version>
45+
</dependency>
46+
47+
<dependency>
48+
<groupId>com.fasterxml.jackson.core</groupId>
49+
<artifactId>jackson-databind</artifactId>
50+
<version>${jackson-databind.version}</version>
51+
</dependency>
52+
53+
<dependency>
54+
<groupId>org.mozilla</groupId>
55+
<artifactId>rhino</artifactId>
56+
<version>${rhino.version}</version>
57+
</dependency>
58+
3859
<dependency>
3960
<groupId>io.rest-assured</groupId>
4061
<artifactId>rest-assured</artifactId>
@@ -44,17 +65,23 @@
4465
<groupId>commons-codec</groupId>
4566
<artifactId>commons-codec</artifactId>
4667
</exclusion>
47-
<exclusion>
48-
<groupId>com.fasterxml.jackson.core</groupId>
49-
<artifactId>jackson-databind</artifactId>
50-
</exclusion>
5168
</exclusions>
5269
</dependency>
5370

5471
<dependency>
5572
<groupId>io.rest-assured</groupId>
5673
<artifactId>json-schema-validator</artifactId>
5774
<version>${restassured.version}</version>
75+
<exclusions>
76+
<exclusion>
77+
<groupId>com.fasterxml.jackson.core</groupId>
78+
<artifactId>jackson-databind</artifactId>
79+
</exclusion>
80+
<exclusion>
81+
<groupId>org.mozilla</groupId>
82+
<artifactId>rhino</artifactId>
83+
</exclusion>
84+
</exclusions>
5885
</dependency>
5986

6087
<dependency>
@@ -63,6 +90,13 @@
6390
<version>${junit.jupiter.version}</version>
6491
</dependency>
6592

93+
<dependency>
94+
<groupId>org.junit.platform</groupId>
95+
<artifactId>junit-platform-launcher</artifactId>
96+
<version>${junit.jupiter.version}</version>
97+
<scope>test</scope>
98+
</dependency>
99+
66100
<dependency>
67101
<groupId>org.assertj</groupId>
68102
<artifactId>assertj-core</artifactId>
@@ -93,18 +127,6 @@
93127
<version>${log4j.version}</version>
94128
</dependency>
95129

96-
<dependency>
97-
<groupId>io.qameta.allure</groupId>
98-
<artifactId>allure-testng</artifactId>
99-
<version>${allure.version}</version>
100-
<exclusions>
101-
<exclusion>
102-
<groupId>org.testng</groupId>
103-
<artifactId>testng</artifactId>
104-
</exclusion>
105-
</exclusions>
106-
</dependency>
107-
108130
<dependency>
109131
<groupId>io.qameta.allure</groupId>
110132
<artifactId>allure-attachments</artifactId>
@@ -129,13 +151,6 @@
129151
<artifactId>slf4j-simple</artifactId>
130152
<version>${slf4j.version}</version>
131153
</dependency>
132-
133-
<!-- override vulnerable dependencies -->
134-
<dependency>
135-
<groupId>com.fasterxml.jackson.core</groupId>
136-
<artifactId>jackson-databind</artifactId>
137-
<version>${jackson-databind.version}</version>
138-
</dependency>
139154
</dependencies>
140155

141156
<build>

src/main/java/com/eliasnogueira/credit/commons/MessageFormat.java renamed to src/main/java/com/eliasnogueira/credit/commons/LocationUrlResolver.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@
3030

3131
import static java.text.MessageFormat.format;
3232

33-
public class MessageFormat {
33+
public class LocationUrlResolver {
3434

35-
private static final Logger log = LogManager.getLogger(MessageFormat.class);
35+
private static final Logger log = LogManager.getLogger(LocationUrlResolver.class);
3636

37-
private MessageFormat() {}
37+
private LocationUrlResolver() {}
3838
/*
3939
* This method was created to remove the post if is a test environment because the 443 port must be informed
40-
* to make the requests, but should not be show in the URL
40+
* to make the requests, but should not be shown in the URL
4141
*/
4242
public static String locationURLByEnvironment() {
4343
String locationURL;

src/main/java/com/eliasnogueira/credit/data/factory/RestrictionDataFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ private RestrictionDataFactory() {
3636
}
3737

3838
public static String cpfWithoutRestriction() {
39-
String cpf = String.valueOf(faker.number().randomNumber(11, false));
39+
String cpf = faker.cpf().invalid();
4040

4141
log.info("CPF without restriction in use: {}", cpf);
4242
return cpf;

src/main/java/com/eliasnogueira/credit/specs/SimulationsSpecs.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
import static org.hamcrest.CoreMatchers.startsWith;
2727

28-
import com.eliasnogueira.credit.commons.MessageFormat;
28+
import com.eliasnogueira.credit.commons.LocationUrlResolver;
2929
import com.eliasnogueira.credit.data.factory.SimulationDataFactory;
3030
import io.restassured.builder.RequestSpecBuilder;
3131
import io.restassured.builder.ResponseSpecBuilder;
@@ -51,7 +51,7 @@ public static RequestSpecification postValidSimulation() {
5151
public static ResponseSpecification createdSimulation() {
5252
return new ResponseSpecBuilder().
5353
expectStatusCode(HttpStatus.SC_CREATED).
54-
expectHeader("Location", startsWith(MessageFormat.locationURLByEnvironment())).
54+
expectHeader("Location", startsWith(LocationUrlResolver.locationURLByEnvironment())).
5555
build();
5656
}
5757
}

src/test/java/com/eliasnogueira/credit/simulations/SimulationsFunctionalTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
package com.eliasnogueira.credit.simulations;
2525

2626
import com.eliasnogueira.credit.BaseAPI;
27-
import com.eliasnogueira.credit.commons.MessageFormat;
27+
import com.eliasnogueira.credit.commons.LocationUrlResolver;
2828
import com.eliasnogueira.credit.data.factory.SimulationDataFactory;
2929
import com.eliasnogueira.credit.data.provider.SimulationDataProvider;
3030
import com.eliasnogueira.credit.model.Simulation;
@@ -53,7 +53,7 @@
5353
class SimulationsFunctionalTest extends BaseAPI {
5454

5555
/*
56-
* not that, in order to assert the amount without problem, we must enable a configuration
56+
* not that, to assert the amount without a problem, we must enable a configuration
5757
* it's located at BaseAPI class
5858
*/
5959
@Test
@@ -145,7 +145,7 @@ void createNewSimulationSuccessfully() {
145145
post("/simulations/").
146146
then().
147147
statusCode(SC_CREATED).
148-
header("Location", containsString(MessageFormat.locationURLByEnvironment()));
148+
header("Location", containsString(LocationUrlResolver.locationURLByEnvironment()));
149149
}
150150

151151
@Tag(FUNCTIONAL)

0 commit comments

Comments
 (0)