Test cleanup in spring-cloud-stream module
- Remove the test name prefix from the test methods in core spring-cloud-stream module Part of fixing https://github.com/spring-cloud/spring-cloud-stream/issues/2371.
This commit is contained in:
@@ -47,7 +47,7 @@ class BindingTargetTests {
|
||||
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
@Test
|
||||
void testArbitraryInterfaceChannelsBound() {
|
||||
void arbitraryInterfaceChannelsBound() {
|
||||
Binder binder = this.binderFactory.getBinder(null, MessageChannel.class);
|
||||
verify(binder).bindConsumer(eq("someQueue.0"), isNull(),
|
||||
Mockito.any(MessageChannel.class), Mockito.any());
|
||||
|
||||
@@ -30,7 +30,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
class DefaultBinderTests {
|
||||
|
||||
@Test
|
||||
void testDefaultBinderIsPaused() {
|
||||
void defaultBinderIsPaused() {
|
||||
@SuppressWarnings({ "rawtypes" })
|
||||
DefaultBinding<?> binding = new DefaultBinding<>("foo", "bar", "target", (Binding) () -> {
|
||||
});
|
||||
@@ -43,13 +43,13 @@ class DefaultBinderTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
void testDefaultBinderIsNull() {
|
||||
void defaultBinderIsNull() {
|
||||
DefaultBinding<?> binding = new DefaultBinding<>("foo", "bar", "target", null);
|
||||
assertThat(binding.getState()).isNotNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
void testDefaultBinderIsRunning() {
|
||||
void defaultBinderIsRunning() {
|
||||
DefaultBinding<?> binding = new DefaultBinding<>("foo", "bar", "target", new Lifecycle() {
|
||||
private Boolean running = false;
|
||||
@Override
|
||||
|
||||
@@ -34,7 +34,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
class ExtendedPropertiesDefaultTests {
|
||||
|
||||
@Test
|
||||
void testExtendedDefaultProducerProperties() {
|
||||
void extendedDefaultProducerProperties() {
|
||||
DefaultBinderFactory binderFactory = createMockExtendedBinderFactory();
|
||||
Binder<MessageChannel, ?, ?> binder = binderFactory.getBinder(null,
|
||||
MessageChannel.class);
|
||||
@@ -46,7 +46,7 @@ class ExtendedPropertiesDefaultTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
void testExtendedDefaultConsumerProperties() {
|
||||
void extendedDefaultConsumerProperties() {
|
||||
DefaultBinderFactory binderFactory = createMockExtendedBinderFactory();
|
||||
Binder<MessageChannel, ?, ?> binder = binderFactory.getBinder(null,
|
||||
MessageChannel.class);
|
||||
|
||||
@@ -46,7 +46,7 @@ class InputOutputBindingOrderTest {
|
||||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
@Test
|
||||
void testInputOutputBindingOrder() {
|
||||
void inputOutputBindingOrder() {
|
||||
ConfigurableApplicationContext applicationContext = new SpringApplicationBuilder(
|
||||
TestSource.class).web(WebApplicationType.NONE).run(
|
||||
"--spring.cloud.stream.defaultBinder=mock",
|
||||
|
||||
@@ -36,7 +36,7 @@ import static org.assertj.core.api.Assertions.fail;
|
||||
class MessageConverterTests {
|
||||
|
||||
@Test
|
||||
void testHeaderEmbedding() throws Exception {
|
||||
void headerEmbedding() throws Exception {
|
||||
Message<byte[]> message = MessageBuilder.withPayload("Hello".getBytes())
|
||||
.setHeader("foo", "bar").setHeader("baz", "quxx").build();
|
||||
byte[] embedded = EmbeddedHeaderUtils.embedHeaders(new MessageValues(message),
|
||||
@@ -53,7 +53,7 @@ class MessageConverterTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
void testConfigurableHeaders() throws Exception {
|
||||
void configurableHeaders() throws Exception {
|
||||
Message<byte[]> message = MessageBuilder.withPayload("Hello".getBytes())
|
||||
.setHeader("foo", "bar").setHeader("baz", "quxx")
|
||||
.setHeader("contentType", "text/plain").build();
|
||||
@@ -80,7 +80,7 @@ class MessageConverterTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
void testHeaderExtractionWithDirectPayload() throws Exception {
|
||||
void headerExtractionWithDirectPayload() throws Exception {
|
||||
Message<byte[]> message = MessageBuilder.withPayload("Hello".getBytes())
|
||||
.setHeader("foo", "bar").setHeader("baz", "quxx").build();
|
||||
byte[] embedded = EmbeddedHeaderUtils.embedHeaders(new MessageValues(message),
|
||||
@@ -96,7 +96,7 @@ class MessageConverterTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
void testUnicodeHeader() throws Exception {
|
||||
void unicodeHeader() throws Exception {
|
||||
Message<byte[]> message = MessageBuilder.withPayload("Hello".getBytes())
|
||||
.setHeader("foo", "bar").setHeader("baz", "ØØØØØØØØ").build();
|
||||
byte[] embedded = EmbeddedHeaderUtils.embedHeaders(new MessageValues(message),
|
||||
@@ -113,7 +113,7 @@ class MessageConverterTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
void testHeaderEmbeddingMissingHeader() throws Exception {
|
||||
void headerEmbeddingMissingHeader() throws Exception {
|
||||
Message<byte[]> message = MessageBuilder.withPayload("Hello".getBytes())
|
||||
.setHeader("foo", "bar").build();
|
||||
byte[] embedded = EmbeddedHeaderUtils.embedHeaders(new MessageValues(message),
|
||||
@@ -124,7 +124,7 @@ class MessageConverterTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
void testBadDecode() throws Exception {
|
||||
void badDecode() throws Exception {
|
||||
byte[] bytes = new byte[] { (byte) 0xff, 99 };
|
||||
Message<byte[]> message = new GenericMessage<>(bytes);
|
||||
try {
|
||||
|
||||
@@ -45,7 +45,7 @@ class SinkBindingWithDefaultsTests {
|
||||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
@Test
|
||||
void testSinkInputChannelBound() {
|
||||
void sinkInputChannelBound() {
|
||||
Binder binder = this.binderFactory.getBinder(null, MessageChannel.class);
|
||||
verify(binder).bindConsumer(eq("consumer-in-0"), isNull(), Mockito.any(MessageChannel.class),
|
||||
Mockito.any());
|
||||
|
||||
@@ -37,7 +37,7 @@ import static org.mockito.Mockito.mock;
|
||||
class BindingLifecycleTests {
|
||||
|
||||
@Test
|
||||
void testInputBindingLifecycle() {
|
||||
void inputBindingLifecycle() {
|
||||
Map<String, Bindable> bindables = new HashMap<>();
|
||||
|
||||
Bindable bindableWithTwo = new Bindable() {
|
||||
@@ -71,7 +71,7 @@ class BindingLifecycleTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
void testOutputBindingLifecycle() {
|
||||
void outputBindingLifecycle() {
|
||||
Map<String, Bindable> bindables = new HashMap<>();
|
||||
|
||||
Bindable bindableWithTwo = new Bindable() {
|
||||
|
||||
@@ -44,7 +44,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
class CustomPartitionedProducerTest {
|
||||
|
||||
@Test
|
||||
void testCustomPartitionedProducer() {
|
||||
void customPartitionedProducer() {
|
||||
ApplicationContext context = SpringApplication.run(
|
||||
CustomPartitionedProducerTest.TestSource.class,
|
||||
"--spring.cloud.stream.output-bindings=output",
|
||||
@@ -81,7 +81,7 @@ class CustomPartitionedProducerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
void testCustomPartitionedProducerByName() {
|
||||
void customPartitionedProducerByName() {
|
||||
ApplicationContext context = SpringApplication.run(
|
||||
CustomPartitionedProducerTest.TestSource.class,
|
||||
"--spring.cloud.stream.output-bindings=output",
|
||||
@@ -149,7 +149,7 @@ class CustomPartitionedProducerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCustomPartitionedProducerMultipleInstances() {
|
||||
public void customPartitionedProducerMultipleInstances() {
|
||||
ApplicationContext context = SpringApplication.run(
|
||||
CustomPartitionedProducerTest.TestSourceMultipleStrategies.class,
|
||||
"--spring.cloud.stream.output-bindings=output",
|
||||
|
||||
@@ -45,7 +45,7 @@ import static org.assertj.core.api.Assertions.fail;
|
||||
class MessageConverterConfigurerTests {
|
||||
|
||||
// @Test
|
||||
void testConfigureOutputChannelWithBadContentType() {
|
||||
void configureOutputChannelWithBadContentType() {
|
||||
BindingServiceProperties props = new BindingServiceProperties();
|
||||
BindingProperties bindingProps = new BindingProperties();
|
||||
bindingProps.setContentType("application/json");
|
||||
@@ -65,7 +65,7 @@ class MessageConverterConfigurerTests {
|
||||
|
||||
@Test
|
||||
@Disabled
|
||||
void testConfigureOutputChannelCannotConvert() {
|
||||
void configureOutputChannelCannotConvert() {
|
||||
BindingServiceProperties props = new BindingServiceProperties();
|
||||
BindingProperties bindingProps = new BindingProperties();
|
||||
bindingProps.setContentType("foo/bar");
|
||||
|
||||
@@ -40,7 +40,7 @@ class ArgumentResolversTests {
|
||||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
@Test
|
||||
void testSmartPayloadArgumentResolver() throws Exception {
|
||||
void smartPayloadArgumentResolver() throws Exception {
|
||||
|
||||
SmartPayloadArgumentResolver resolver = new SmartPayloadArgumentResolver(new TestMessageConverter());
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ class PartitionedConsumerTest {
|
||||
|
||||
@Test
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
void testBindingPartitionedConsumer() {
|
||||
void bindingPartitionedConsumer() {
|
||||
Binder binder = this.binderFactory.getBinder(null, MessageChannel.class);
|
||||
ArgumentCaptor<ConsumerProperties> argumentCaptor = ArgumentCaptor
|
||||
.forClass(ConsumerProperties.class);
|
||||
|
||||
Reference in New Issue
Block a user