Browse Source

DATACMNS-1552 - Test case to verify Option values are returned as is.

Make sure that the fix for DATACMNS-1524 fixes this ticket as well. A bit of whitespace in QueryExecutionResultHandler.
pull/400/head
Oliver Drotbohm 7 years ago
parent
commit
fa9e5b799a
  1. 2
      src/main/java/org/springframework/data/repository/core/support/QueryExecutionResultHandler.java
  2. 8
      src/test/java/org/springframework/data/repository/core/support/QueryExecutionResultHandlerUnitTests.java

2
src/main/java/org/springframework/data/repository/core/support/QueryExecutionResultHandler.java

@ -167,7 +167,7 @@ class QueryExecutionResultHandler { @@ -167,7 +167,7 @@ class QueryExecutionResultHandler {
/**
* Returns whether we have to process the given source object in the first place.
*
*
* @param source can be {@literal null}.
* @param targetType must not be {@literal null}.
* @return

8
src/test/java/org/springframework/data/repository/core/support/QueryExecutionResultHandlerUnitTests.java

@ -405,6 +405,14 @@ public class QueryExecutionResultHandlerUnitTests { @@ -405,6 +405,14 @@ public class QueryExecutionResultHandlerUnitTests {
});
}
@Test // DATACMNS-1552
public void keepsVavrOptionType() throws Exception {
Option<Entity> source = Option.of(new Entity());
assertThat(handler.postProcessInvocationResult(source, getMethod("option"))).isSameAs(source);
}
private static Method getMethod(String methodName) throws Exception {
return Sample.class.getMethod(methodName);
}

Loading…
Cancel
Save