Skip to content

Commit

Permalink
Add ofQueryParamMap method to mapping all query parameters to a Map
Browse files Browse the repository at this point in the history
Signed-off-by: Daeho Kwon <[email protected]>
  • Loading branch information
kwondh5217 committed Jan 19, 2025
1 parent 169c2fc commit e152414
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@
import java.util.function.BiFunction;
import java.util.function.Function;
import java.util.function.Supplier;

import java.util.stream.Collectors;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -359,14 +359,14 @@ private static void testResolver(AnnotatedValueResolver resolver) {
} else {
if (String.class.isAssignableFrom(resolver.elementType())) {
assertThat(value).isEqualTo("");
} else if(QUERY_PARAM_MAP.equals(resolver.httpElementName())) {
} else if (QUERY_PARAM_MAP.equals(resolver.httpElementName())) {
assertThat(value).isNotNull();
} else {
assertThat(value).isNull();
}
}
} else {
if(QUERY_PARAM_MAP.equals(resolver.httpElementName())) {
if (QUERY_PARAM_MAP.equals(resolver.httpElementName())) {
assertThat(resolver.defaultValue()).isNull();
} else {
assertThat(resolver.defaultValue()).isNotNull();
Expand All @@ -378,7 +378,7 @@ private static void testResolver(AnnotatedValueResolver resolver) {
.isEqualTo(resolver.elementType());
} else if (resolver.shouldWrapValueAsOptional()) {
assertThat(value).isEqualTo(Optional.of(resolver.defaultValue()));
} else if(QUERY_PARAM_MAP.equals(resolver.httpElementName())) {
} else if (QUERY_PARAM_MAP.equals(resolver.httpElementName())) {
assertThat(value).isNotNull();
assertThat(value).isInstanceOf(Map.class);
assertThat((Map<?, ?>) value).size()
Expand Down

0 comments on commit e152414

Please sign in to comment.