method already has a condition to retrieve immediateGenericType for a message
This condition was meant to be removed as part of #543 Resolves #624
This commit is contained in:
committed by
Oleg Zhurakousky
parent
d0a0da24bc
commit
9bbb86be2d
@@ -144,7 +144,8 @@ public class FunctionTypeUtilsTests {
|
||||
assertThat(FunctionTypeUtils.isTypeCollection(new ParameterizedTypeReference<String>() { }.getType())).isFalse();
|
||||
assertThat(FunctionTypeUtils.isTypeCollection(new ParameterizedTypeReference<List<String>>() { }.getType())).isTrue();
|
||||
assertThat(FunctionTypeUtils.isTypeCollection(new ParameterizedTypeReference<Flux<List<String>>>() { }.getType())).isTrue();
|
||||
assertThat(FunctionTypeUtils.isTypeCollection(new ParameterizedTypeReference<Flux<Message<List<String>>>>() { }.getType())).isTrue();
|
||||
assertThat(FunctionTypeUtils.isTypeCollection(new ParameterizedTypeReference<Flux<List<Message<String>>>>() { }.getType())).isTrue();
|
||||
assertThat(FunctionTypeUtils.isTypeCollection(new ParameterizedTypeReference<Flux<Message<List<String>>>>() { }.getType())).isFalse();
|
||||
}
|
||||
|
||||
private static Function<String, Integer> function() {
|
||||
|
||||
@@ -206,9 +206,11 @@ public class ContextFunctionCatalogAutoConfigurationTests {
|
||||
assertThat(function).isInstanceOf(Function.class);
|
||||
assertThat(function.isInputTypeMessage()).isTrue();
|
||||
|
||||
Type inputType = function.getInputType();
|
||||
final Type inputType = function.getInputType();
|
||||
|
||||
assertThat((Class<?>) FunctionTypeUtils.getGenericType(inputType)).isAssignableFrom(String.class);
|
||||
assertThat(FunctionTypeUtils.getRawType(inputType)).isAssignableFrom(Flux.class);
|
||||
assertThat(FunctionTypeUtils.getRawType(FunctionTypeUtils.getGenericType(inputType))).isAssignableFrom(Message.class);
|
||||
assertThat(FunctionTypeUtils.getRawType(FunctionTypeUtils.getGenericType(FunctionTypeUtils.getGenericType(inputType)))).isAssignableFrom(String.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -219,9 +221,12 @@ public class ContextFunctionCatalogAutoConfigurationTests {
|
||||
assertThat(function).isInstanceOf(Function.class);
|
||||
assertThat(function.isInputTypeMessage()).isTrue();
|
||||
|
||||
Type inputType = function.getInputType();
|
||||
assertThat((Class<?>) FunctionTypeUtils.getGenericType(inputType)).isAssignableFrom(String.class);
|
||||
final Type inputType = function.getInputType();
|
||||
|
||||
assertThat(FunctionTypeUtils.getRawType(inputType)).isAssignableFrom(Publisher.class);
|
||||
assertThat(FunctionTypeUtils.getRawType(FunctionTypeUtils.getGenericType(inputType))).isAssignableFrom(Message.class);
|
||||
assertThat(FunctionTypeUtils.getRawType(FunctionTypeUtils.getGenericType(FunctionTypeUtils.getGenericType(inputType)))).isAssignableFrom(String.class);
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user