Skip to content

Commit 143905f

Browse files
author
Dennis Labordus
authored
Merge pull request #140 from com-pas/develop
New release
2 parents dfaffc7 + f40801c commit 143905f

File tree

8 files changed

+21
-28
lines changed

8 files changed

+21
-28
lines changed

app/pom.xml

+7-5
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ SPDX-License-Identifier: Apache-2.0
5353
<groupId>io.quarkus</groupId>
5454
<artifactId>quarkus-resteasy-reactive-jaxb</artifactId>
5555
</dependency>
56+
<dependency>
57+
<groupId>io.quarkus</groupId>
58+
<artifactId>quarkus-websockets</artifactId>
59+
</dependency>
60+
5661
<dependency>
5762
<groupId>io.quarkus</groupId>
5863
<artifactId>quarkus-smallrye-jwt</artifactId>
@@ -65,18 +70,15 @@ SPDX-License-Identifier: Apache-2.0
6570
<groupId>io.quarkus</groupId>
6671
<artifactId>quarkus-smallrye-health</artifactId>
6772
</dependency>
73+
6874
<dependency>
6975
<groupId>io.quarkus</groupId>
70-
<artifactId>quarkus-websockets</artifactId>
76+
<artifactId>quarkus-hibernate-validator</artifactId>
7177
</dependency>
7278
<dependency>
7379
<groupId>io.quarkus</groupId>
7480
<artifactId>quarkus-container-image-docker</artifactId>
7581
</dependency>
76-
<dependency>
77-
<groupId>io.quarkus</groupId>
78-
<artifactId>quarkus-hibernate-validator</artifactId>
79-
</dependency>
8082

8183
<!-- Test Dependencies -->
8284
<dependency>

app/src/main/java/org/lfenergy/compas/scl/validator/rest/v1/event/SclValidatorEventRequest.java

-4
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@ public class SclValidatorEventRequest {
1212
private final SclFileType type;
1313
private final String sclData;
1414

15-
public SclValidatorEventRequest(SclFileType type, String sclData) {
16-
this(null, type, sclData);
17-
}
18-
1915
public SclValidatorEventRequest(Session session, SclFileType type, String sclData) {
2016
this.session = session;
2117
this.type = type;

app/src/test/java/org/lfenergy/compas/scl/validator/rest/v1/SclValidatorResourceTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class SclValidatorResourceTest {
3434
private SclValidatorService sclValidatorService;
3535

3636
@Test
37-
void updateSCL_WhenCalled_ThenExpectedResponseIsRetrieved() throws IOException {
37+
void validate_WhenCalled_ThenExpectedResponseIsRetrieved() throws IOException {
3838
var sclFileTye = SclFileType.CID;
3939
var request = new SclValidateRequest();
4040
request.setSclData(TestSupportUtil.readSCL("scl-1.scd"));

app/src/test/java/org/lfenergy/compas/scl/validator/rest/v1/SclValidatorServerEndpointTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class SclValidatorServerEndpointTest {
4242
private URI uri;
4343

4444
@Test
45-
void updateSCL_WhenCalled_ThenExpectedResponseIsRetrieved() throws Exception {
45+
void validate_WhenCalled_ThenExpectedResponseIsRetrieved() throws Exception {
4646
var encoder = new SclValidateRequestEncoder();
4747
var sclFileTye = SclFileType.SCD;
4848
var request = new SclValidateRequest();

app/src/test/java/org/lfenergy/compas/scl/validator/rest/v1/event/SclValidatorEventHandlerTest.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
import javax.websocket.RemoteEndpoint;
1919
import javax.websocket.Session;
20-
import java.io.IOException;
2120
import java.util.ArrayList;
2221

2322
import static org.junit.jupiter.api.Assertions.assertEquals;
@@ -32,7 +31,7 @@ class SclValidatorEventHandlerTest {
3231
private SclValidatorEventHandler eventHandler;
3332

3433
@Test
35-
void validateWebsocketsEvent_WhenCalled_ThenExpectedCallsAreMade() throws IOException {
34+
void validateWebsocketsEvent_WhenCalled_ThenExpectedCallsAreMade() {
3635
var veList = new ArrayList<ValidationError>();
3736
var type = SclFileType.CID;
3837
var sclData = "Some SCL Data";

app/src/test/java/org/lfenergy/compas/scl/validator/rest/v1/event/SclValidatorEventRequestTest.java

+2-15
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,8 @@
1414
import javax.websocket.Session;
1515

1616
import static org.junit.jupiter.api.Assertions.assertEquals;
17-
import static org.junit.jupiter.api.Assertions.assertNull;
1817

1918
class SclValidatorEventRequestTest {
20-
@Test
21-
void constructor_WhenCalledWith2Arguments_ThenValuesSet() {
22-
var type = SclFileType.CID;
23-
var sclData = "Some SCL Data";
24-
25-
var result = new SclValidatorEventRequest(type, sclData);
26-
27-
assertNull(result.getSession());
28-
assertEquals(type, result.getType());
29-
assertEquals(sclData, result.getSclData());
30-
}
31-
3219
@Test
3320
void constructor_WhenCalledWith3Arguments_ThenValuesSet() {
3421
var session = Mockito.mock(Session.class);
@@ -46,9 +33,9 @@ void constructor_WhenCalledWith3Arguments_ThenValuesSet() {
4633
void validateSettersAndGetters() {
4734
var personPojo = PojoClassFactory.getPojoClass(SclValidatorEventRequest.class);
4835
var validator = ValidatorBuilder.create()
49-
// Lets make sure that we have a getter for every field defined.
36+
// Let's make sure that we have a getter for every field defined.
5037
.with(new GetterMustExistRule())
51-
// Lets also validate that they are behaving as expected
38+
// Let's also validate that they are behaving as expected
5239
.with(new GetterTester())
5340
.build();
5441

pom.xml

+5
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,11 @@ SPDX-License-Identifier: Apache-2.0
115115
<artifactId>xercesImpl</artifactId>
116116
<version>2.12.2</version>
117117
</dependency>
118+
<dependency>
119+
<groupId>com.fasterxml.woodstox</groupId>
120+
<artifactId>woodstox-core</artifactId>
121+
<version>6.4.0</version>
122+
</dependency>
118123

119124
<dependency>
120125
<groupId>org.eclipse.microprofile.openapi</groupId>

validator/pom.xml

+4
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ SPDX-License-Identifier: Apache-2.0
4444
<groupId>xerces</groupId>
4545
<artifactId>xercesImpl</artifactId>
4646
</dependency>
47+
<dependency>
48+
<groupId>com.fasterxml.woodstox</groupId>
49+
<artifactId>woodstox-core</artifactId>
50+
</dependency>
4751

4852
<dependency>
4953
<groupId>org.slf4j</groupId>

0 commit comments

Comments
 (0)