Skip to content

Commit

Permalink
Merge e0b4e63 into 0d25464
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliver Grande committed Dec 13, 2021
2 parents 0d25464 + e0b4e63 commit 7186cfa
Show file tree
Hide file tree
Showing 11 changed files with 29 additions and 18 deletions.
4 changes: 2 additions & 2 deletions jpa-archetype/jpa-archetype-spring/pom.xml
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.sap.olingo</groupId>
<artifactId>odata-jpa-archetype</artifactId>
<version>0.3.10</version>
<version>0.3.11</version>
</parent>
<artifactId>odata-jpa-archetype-spring</artifactId>
<name>Archetype - odata-jpa-archetype-spring</name>
Expand Down Expand Up @@ -33,4 +33,4 @@
</plugin>
</plugins>
</build>
</project>
</project>
4 changes: 2 additions & 2 deletions jpa-archetype/pom.xml
Expand Up @@ -5,14 +5,14 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.sap.olingo</groupId>
<artifactId>odata-jpa-archetype</artifactId>
<version>0.3.10</version>
<version>0.3.11</version>
<packaging>pom</packaging>
<url>https://github.com/SAP/olingo-jpa-processor-v4</url>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.build.source>1.8</project.build.source>
<odata.jpa.version>0.3.10-SNAPSHOT</odata.jpa.version>
<odata.jpa.version>0.3.11-SNAPSHOT</odata.jpa.version>
</properties>

<modules>
Expand Down
4 changes: 2 additions & 2 deletions jpa/odata-jpa-annotation/pom.xml
Expand Up @@ -5,8 +5,8 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.sap.olingo</groupId>
<artifactId>odata-jpa</artifactId>
<version>0.3.10-SNAPSHOT</version>
<artifactId>odata-jpa</artifactId>
<version>0.3.11-SNAPSHOT</version>
</parent>
<artifactId>odata-jpa-annotation</artifactId>
<name>odata-jpa-annotation</name>
Expand Down
2 changes: 1 addition & 1 deletion jpa/odata-jpa-coverage/pom.xml
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.sap.olingo</groupId>
<artifactId>odata-jpa</artifactId>
<version>0.3.10-SNAPSHOT</version>
<version>0.3.11-SNAPSHOT</version>
</parent>

<artifactId>odata-jpa-coverage</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion jpa/odata-jpa-metadata/pom.xml
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.sap.olingo</groupId>
<artifactId>odata-jpa</artifactId>
<version>0.3.10-SNAPSHOT</version>
<version>0.3.11-SNAPSHOT</version>
</parent>


Expand Down
4 changes: 2 additions & 2 deletions jpa/odata-jpa-processor/pom.xml
Expand Up @@ -6,8 +6,8 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.sap.olingo</groupId>
<artifactId>odata-jpa</artifactId>
<version>0.3.10-SNAPSHOT</version>
<artifactId>odata-jpa</artifactId>
<version>0.3.11-SNAPSHOT</version>
</parent>

<artifactId>odata-jpa-processor</artifactId>
Expand Down
Expand Up @@ -193,6 +193,7 @@ private void copyContextValues(final JPAODataRequestContextAccess context) {
this.em = context.getEntityManager();
this.jpaCUDRequestHandler = context.getCUDRequestHandler();
this.debugger = context.getDebugger();
this.transactionFactory = context.getTransactionFactory();
}

private void createDefaultTransactionFactory() {
Expand Down
Expand Up @@ -121,7 +121,7 @@ public void testThrowsExceptionOnSerializerIsNull() throws JPAIllicalAccessExcep
}

@Test
public void testCopyConstructorCopysExternalAndAddsUriInfo() throws JPAIllicalAccessException {
public void testCopyConstructorCopyExternalAndAddsUriInfo() throws JPAIllicalAccessException {
fillContextForCopyConstructor();
final JPASerializer serializer = mock(JPASerializer.class);
final UriInfo uriInfo = mock(UriInfo.class);
Expand All @@ -135,7 +135,7 @@ public void testCopyConstructorCopysExternalAndAddsUriInfo() throws JPAIllicalAc
}

@Test
public void testCopyConstructorCopysExternalAndAddsPageSerializer() {
public void testCopyConstructorCopyExternalAndAddsPageSerializer() {
fillContextForCopyConstructor();
final UriInfo uriInfo = mock(UriInfo.class);
JPAODataRequestContextImpl act = new JPAODataRequestContextImpl(uriInfo, cut);
Expand All @@ -145,7 +145,7 @@ public void testCopyConstructorCopysExternalAndAddsPageSerializer() {
}

@Test
public void testCopyConstructorCopysExternalAndAddsUriInfoSerializer() {
public void testCopyConstructorCopyExternalAndAddsUriInfoSerializer() {
fillContextForCopyConstructor();
final UriInfo uriInfo = mock(UriInfo.class);
final JPASerializer serializer = mock(JPASerializer.class);
Expand All @@ -157,7 +157,7 @@ public void testCopyConstructorCopysExternalAndAddsUriInfoSerializer() {
}

@Test
public void testCopyConstructorCopysExternalAndAddsUriInfoSerializerNull() {
public void testCopyConstructorCopyExternalAndAddsUriInfoSerializerNull() {
fillContextForCopyConstructor();
final UriInfo uriInfo = mock(UriInfo.class);
JPAODataRequestContextImpl act = new JPAODataRequestContextImpl(uriInfo, null, cut);
Expand All @@ -166,6 +166,14 @@ public void testCopyConstructorCopysExternalAndAddsUriInfoSerializerNull() {
assertEquals(null, act.getSerializer());
assertCopied(act);
}
@Test
public void testCopyConstructorCopyTransactionFactory() {
fillContextForCopyConstructor();
final UriInfo uriInfo = mock(UriInfo.class);
JPAODataRequestContextImpl act = new JPAODataRequestContextImpl(uriInfo, null, cut);

assertEquals(cut.getTransactionFactory(), act.getTransactionFactory());
}

@Test
public void testReturnsDefaultTransactionFactory() throws JPAIllicalAccessException {
Expand All @@ -191,8 +199,10 @@ private void fillContextForCopyConstructor() {
final EntityManager expEm = mock(EntityManager.class);
final JPAODataClaimProvider expCp = new JPAODataClaimsProvider();
final JPAODataGroupProvider expGp = new JPAODataGroupsProvider();
final JPAODataTransactionFactory expTF = mock(JPAODataTransactionFactory.class);
cut.setEntityManager(expEm);
cut.setClaimsProvider(expCp);
cut.setGroupsProvider(expGp);
cut.setTransactionFactory(expTF);
}
}
2 changes: 1 addition & 1 deletion jpa/odata-jpa-spring-support/pom.xml
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.sap.olingo</groupId>
<artifactId>odata-jpa</artifactId>
<version>0.3.10-SNAPSHOT</version>
<version>0.3.11-SNAPSHOT</version>
</parent>

<artifactId>odata-jpa-spring-support</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions jpa/odata-jpa-test/pom.xml
Expand Up @@ -6,8 +6,8 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.sap.olingo</groupId>
<artifactId>odata-jpa</artifactId>
<version>0.3.10-SNAPSHOT</version>
<artifactId>odata-jpa</artifactId>
<version>0.3.11-SNAPSHOT</version>
</parent>

<artifactId>odata-jpa-test</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion jpa/pom.xml
Expand Up @@ -5,7 +5,7 @@

<groupId>com.sap.olingo</groupId>
<artifactId>odata-jpa</artifactId>
<version>0.3.10-SNAPSHOT</version>
<version>0.3.11-SNAPSHOT</version>
<packaging>pom</packaging>

<name>odata-jpa</name>
Expand Down

0 comments on commit 7186cfa

Please sign in to comment.