Skip to content

Commit

Permalink
Merge pull request #84 from CJSCommonPlatform/update-framework
Browse files Browse the repository at this point in the history
Update framework to 11.0.0-M6
  • Loading branch information
allanmckenzie committed Jun 15, 2021
2 parents ff2f58f + a985a1c commit 6ca5b23
Show file tree
Hide file tree
Showing 17 changed files with 47 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import java.time.ZonedDateTime;
import java.util.UUID;

import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.junit.Before;
import org.junit.Test;
Expand Down Expand Up @@ -44,10 +45,11 @@ public void shouldCreateCakeOrderedEvent() throws Exception {

}

@SuppressWarnings("deprecation")
@Test(expected = IllegalStateException.class)
public void shouldThrowIllegalStateExceptionOnMapperIOException() throws IOException {
final ObjectMapper mockedMapper = Mockito.mock(ObjectMapper.class);
when(mockedMapper.readValue(Mockito.anyString(), Mockito.eq(CakeOrdered.class))).thenThrow(new IOException("Error"));
when(mockedMapper.readValue(Mockito.anyString(), Mockito.eq(CakeOrdered.class))).thenThrow(new JsonMappingException("Error"));
eventFactory.objectMapper = mockedMapper;

eventFactory.cakeOrderedEventFrom(envelope().with(metadataWithDefaults()).build());
Expand Down
5 changes: 5 additions & 0 deletions example-context/example-service/example-event/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,11 @@
</execution>
</executions>
<dependencies>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>${jee.api.version}</version>
</dependency>
<dependency>
<groupId>uk.gov.justice.framework-generators</groupId>
<artifactId>messaging-adapter-generator</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion example-context/example-service/example-it/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.jayway.awaitility</groupId>
<groupId>org.awaitility</groupId>
<artifactId>awaitility</artifactId>
<scope>test</scope>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package uk.gov.justice.services.example.cakeshop.it;

import static com.jayway.awaitility.Awaitility.await;
import static org.awaitility.Awaitility.await;
import static com.jayway.jsonassert.JsonAssert.with;
import static java.util.UUID.randomUUID;
import static javax.json.Json.createArrayBuilder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package uk.gov.justice.services.example.cakeshop.it;

import static com.jayway.awaitility.Awaitility.await;
import static org.awaitility.Awaitility.await;
import static java.util.UUID.fromString;
import static java.util.UUID.randomUUID;
import static javax.ws.rs.client.Entity.entity;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package uk.gov.justice.services.example.cakeshop.it;

import static com.jayway.awaitility.Awaitility.await;
import static org.awaitility.Awaitility.await;
import static com.jayway.jsonassert.JsonAssert.with;
import static java.util.Arrays.asList;
import static java.util.Collections.singletonList;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package uk.gov.justice.services.example.cakeshop.it;

import static com.google.common.io.Resources.getResource;
import static com.jayway.awaitility.Awaitility.await;
import static org.awaitility.Awaitility.await;
import static com.jayway.jsonassert.JsonAssert.with;
import static java.lang.String.format;
import static java.util.UUID.randomUUID;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package uk.gov.justice.services.example.cakeshop.it;

import static com.jayway.awaitility.Awaitility.await;
import static org.awaitility.Awaitility.await;
import static com.jayway.jsonassert.JsonAssert.emptyCollection;
import static com.jayway.jsonassert.JsonAssert.with;
import static java.util.Arrays.asList;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package uk.gov.justice.services.example.cakeshop.it;

import static com.jayway.awaitility.Awaitility.await;
import static org.awaitility.Awaitility.await;
import static com.jayway.jsonassert.JsonAssert.with;
import static java.util.Collections.singletonList;
import static java.util.UUID.randomUUID;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package uk.gov.justice.services.example.cakeshop.it;

import static com.jayway.awaitility.Awaitility.await;
import static org.awaitility.Awaitility.await;
import static com.jayway.jsonassert.JsonAssert.with;
import static java.time.temporal.ChronoUnit.SECONDS;
import static java.util.UUID.randomUUID;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package uk.gov.justice.services.example.cakeshop.it;

import static com.jayway.awaitility.Awaitility.await;
import static org.awaitility.Awaitility.await;
import static com.jayway.jsonassert.JsonAssert.with;
import static java.util.Collections.singletonList;
import static java.util.UUID.randomUUID;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package uk.gov.justice.services.example.cakeshop.it;

import static com.jayway.awaitility.Awaitility.await;
import static org.awaitility.Awaitility.await;
import static com.jayway.jsonassert.JsonAssert.with;
import static java.util.UUID.randomUUID;
import static org.hamcrest.core.IsCollectionContaining.hasItem;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package uk.gov.justice.services.example.cakeshop.it;

import static com.jayway.awaitility.Awaitility.await;
import static org.awaitility.Awaitility.await;
import static com.jayway.jsonassert.JsonAssert.with;
import static java.lang.Integer.parseInt;
import static java.lang.String.format;
Expand Down Expand Up @@ -219,6 +219,8 @@ private void verifyRecipeAdded(final String recipeId,
} else {
verifyResponse(recId, status);
}

return true;
});
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package uk.gov.justice.services.example.cakeshop.it;

import static com.jayway.awaitility.Awaitility.await;
import static org.awaitility.Awaitility.await;
import static com.jayway.jsonassert.JsonAssert.with;
import static java.util.UUID.randomUUID;
import static javax.json.Json.createObjectBuilder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@
</execution>
</executions>
<dependencies>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>${javaee-api.version}</version>
</dependency>
<dependency>
<groupId>uk.gov.justice.services.example</groupId>
<artifactId>example-query-view</artifactId>
Expand Down
15 changes: 15 additions & 0 deletions example-context/example-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,11 @@
</execution>
</executions>
<dependencies>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>${jee.api.version}</version>
</dependency>
<dependency>
<groupId>uk.gov.justice.framework-generators</groupId>
<artifactId>rest-adapter-generator</artifactId>
Expand Down Expand Up @@ -445,6 +450,11 @@
</execution>
</executions>
<dependencies>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>${jee.api.version}</version>
</dependency>
<dependency>
<groupId>uk.gov.justice.framework-generators</groupId>
<artifactId>messaging-adapter-generator</artifactId>
Expand Down Expand Up @@ -485,6 +495,11 @@
</execution>
</executions>
<dependencies>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>${jee.api.version}</version>
</dependency>
<dependency>
<groupId>uk.gov.justice.framework-generators</groupId>
<artifactId>messaging-client-generator</artifactId>
Expand Down
9 changes: 5 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>uk.gov.justice</groupId>
<artifactId>maven-framework-parent-pom</artifactId>
<version>11.0.0-M1</version>
<version>11.0.0-M3</version>
</parent>

<groupId>uk.gov.justice.example</groupId>
Expand All @@ -34,10 +34,11 @@
<wildfly.version>20.0.1.Final</wildfly.version>
<wildfly.maven.plugin.version>2.0.2.Final</wildfly.maven.plugin.version>

<framework-libraries.version>11.0.0-M1</framework-libraries.version>
<framework.version>11.0.0-M1</framework.version>
<event-store.version>11.0.0-M1</event-store.version>
<framework-libraries.version>11.0.0-M7</framework-libraries.version>
<framework.version>11.0.0-M6</framework.version>
<event-store.version>11.0.0-M6</event-store.version>

<jee.api.version>8.0</jee.api.version>
</properties>

<dependencyManagement>
Expand Down

0 comments on commit 6ca5b23

Please sign in to comment.