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.
This commit is contained in:
Oliver Drotbohm
2019-07-04 12:21:13 +02:00
parent 0defbe3fa6
commit fa9e5b799a
2 changed files with 9 additions and 1 deletions

View File

@@ -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

View File

@@ -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);
}