Skip to content

Commit

Permalink
Merge pull request #140 from com-pas/develop
Browse files Browse the repository at this point in the history
New release
  • Loading branch information
Dennis Labordus authored Nov 1, 2022
2 parents dfaffc7 + f40801c commit 143905f
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 28 deletions.
12 changes: 7 additions & 5 deletions app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ SPDX-License-Identifier: Apache-2.0
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-reactive-jaxb</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-websockets</artifactId>
</dependency>

<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-smallrye-jwt</artifactId>
Expand All @@ -65,18 +70,15 @@ SPDX-License-Identifier: Apache-2.0
<groupId>io.quarkus</groupId>
<artifactId>quarkus-smallrye-health</artifactId>
</dependency>

<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-websockets</artifactId>
<artifactId>quarkus-hibernate-validator</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-container-image-docker</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-hibernate-validator</artifactId>
</dependency>

<!-- Test Dependencies -->
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ public class SclValidatorEventRequest {
private final SclFileType type;
private final String sclData;

public SclValidatorEventRequest(SclFileType type, String sclData) {
this(null, type, sclData);
}

public SclValidatorEventRequest(Session session, SclFileType type, String sclData) {
this.session = session;
this.type = type;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class SclValidatorResourceTest {
private SclValidatorService sclValidatorService;

@Test
void updateSCL_WhenCalled_ThenExpectedResponseIsRetrieved() throws IOException {
void validate_WhenCalled_ThenExpectedResponseIsRetrieved() throws IOException {
var sclFileTye = SclFileType.CID;
var request = new SclValidateRequest();
request.setSclData(TestSupportUtil.readSCL("scl-1.scd"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class SclValidatorServerEndpointTest {
private URI uri;

@Test
void updateSCL_WhenCalled_ThenExpectedResponseIsRetrieved() throws Exception {
void validate_WhenCalled_ThenExpectedResponseIsRetrieved() throws Exception {
var encoder = new SclValidateRequestEncoder();
var sclFileTye = SclFileType.SCD;
var request = new SclValidateRequest();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

import javax.websocket.RemoteEndpoint;
import javax.websocket.Session;
import java.io.IOException;
import java.util.ArrayList;

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

@Test
void validateWebsocketsEvent_WhenCalled_ThenExpectedCallsAreMade() throws IOException {
void validateWebsocketsEvent_WhenCalled_ThenExpectedCallsAreMade() {
var veList = new ArrayList<ValidationError>();
var type = SclFileType.CID;
var sclData = "Some SCL Data";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,8 @@
import javax.websocket.Session;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNull;

class SclValidatorEventRequestTest {
@Test
void constructor_WhenCalledWith2Arguments_ThenValuesSet() {
var type = SclFileType.CID;
var sclData = "Some SCL Data";

var result = new SclValidatorEventRequest(type, sclData);

assertNull(result.getSession());
assertEquals(type, result.getType());
assertEquals(sclData, result.getSclData());
}

@Test
void constructor_WhenCalledWith3Arguments_ThenValuesSet() {
var session = Mockito.mock(Session.class);
Expand All @@ -46,9 +33,9 @@ void constructor_WhenCalledWith3Arguments_ThenValuesSet() {
void validateSettersAndGetters() {
var personPojo = PojoClassFactory.getPojoClass(SclValidatorEventRequest.class);
var validator = ValidatorBuilder.create()
// Lets make sure that we have a getter for every field defined.
// Let's make sure that we have a getter for every field defined.
.with(new GetterMustExistRule())
// Lets also validate that they are behaving as expected
// Let's also validate that they are behaving as expected
.with(new GetterTester())
.build();

Expand Down
5 changes: 5 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,11 @@ SPDX-License-Identifier: Apache-2.0
<artifactId>xercesImpl</artifactId>
<version>2.12.2</version>
</dependency>
<dependency>
<groupId>com.fasterxml.woodstox</groupId>
<artifactId>woodstox-core</artifactId>
<version>6.4.0</version>
</dependency>

<dependency>
<groupId>org.eclipse.microprofile.openapi</groupId>
Expand Down
4 changes: 4 additions & 0 deletions validator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ SPDX-License-Identifier: Apache-2.0
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.woodstox</groupId>
<artifactId>woodstox-core</artifactId>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
Expand Down

0 comments on commit 143905f

Please sign in to comment.