use of io.lettuce.core.codec.StringCodec in project lettuce-core by lettuce-io.
the class OutputRegistryCommandOutputFactoryResolverUnitTests method getStreamingCommandOutput.
CommandOutput<?, ?, ?> getStreamingCommandOutput(String methodName) {
OutputSelector outputSelector = getOutputSelector(methodName);
CommandOutputFactory factory = resolver.resolveStreamingCommandOutput(unwrapReactiveType(outputSelector));
return factory.create(new StringCodec());
}
use of io.lettuce.core.codec.StringCodec in project lettuce-core by lettuce-io.
the class OutputRegistryCommandOutputFactoryResolverUnitTests method getCommandOutput.
CommandOutput<?, ?, ?> getCommandOutput(String methodName) {
OutputSelector outputSelector = getOutputSelector(methodName);
CommandOutputFactory factory = resolver.resolveCommandOutput(Publisher.class.isAssignableFrom(outputSelector.getOutputType().getRawClass()) ? unwrapReactiveType(outputSelector) : outputSelector);
return factory.create(new StringCodec());
}
use of io.lettuce.core.codec.StringCodec in project lettuce-core by lettuce-io.
the class OutputRegistryUnitTests method streamingTypeOfKeyListOuputWithCodecIsAssignableFromListOfString.
@Test
void streamingTypeOfKeyListOuputWithCodecIsAssignableFromListOfString() {
OutputType outputComponentType = OutputRegistry.getStreamingType(ScoredValueListOutput.class);
ResolvableType resolvableType = outputComponentType.withCodec(new StringCodec());
assertThat(resolvableType.isAssignableFrom(ResolvableType.forClassWithGenerics(ScoredValue.class, String.class))).isTrue();
}
use of io.lettuce.core.codec.StringCodec in project lettuce-core by lettuce-io.
the class OutputRegistryUnitTests method componentTypeOfKeyListOuputWithCodecIsAssignableFromListOfString.
@Test
void componentTypeOfKeyListOuputWithCodecIsAssignableFromListOfString() {
OutputType outputComponentType = OutputRegistry.getOutputComponentType(KeyListOutput.class);
ResolvableType resolvableType = outputComponentType.withCodec(new StringCodec());
assertThat(resolvableType.isAssignableFrom(ResolvableType.forClassWithGenerics(List.class, String.class))).isTrue();
}
use of io.lettuce.core.codec.StringCodec in project lettuce-core by lettuce-io.
the class OutputRegistryUnitTests method componentTypeOfKeyOuputWithCodecIsAssignableFromString.
@Test
void componentTypeOfKeyOuputWithCodecIsAssignableFromString() {
OutputType outputComponentType = OutputRegistry.getOutputComponentType(KeyOutput.class);
ResolvableType resolvableType = outputComponentType.withCodec(new StringCodec());
assertThat(resolvableType.isAssignableFrom(String.class)).isTrue();
}
Aggregations