joerghoh commented on code in PR #226:
URL:
https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/226#discussion_r3729560768
##########
src/test/java/org/apache/sling/resourceresolver/impl/mapping/PagedQueryIteratorTest.java:
##########
@@ -98,14 +108,49 @@ public void testSimpleWrongOrder() {
checkResult(it, expected);
}
+ @Test
+ public void testSimpleWrongType() {
+ try (TestLogger logger =
+
TestLogger.createStartedFor(PagedQueryIterator.class).contains("unexpected")) {
+
+ String[] expected = new String[] {"a", "b", "c"};
+ Collection<Resource> expectedResources = toResourceList(expected);
+
+ Date oneMore = new Date(0);
+ ValueMap properties = new ValueMapDecorator(Map.of(PROPNAME, new
Date[] {oneMore}));
Review Comment:
I don't think if this behavior is identical to the behavior of the
JcrValueMap, when it converts the underlying JCR property types to the request
types...
To be on the safe side, I would start with a Sling Mock backed by a JCR OAK
repository; that could make the test more complex (and require more
dependencies), but then you can have the identical behaviour.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]