Package protected tests in core modules

This commit is contained in:
Soby Chacko
2023-11-02 14:50:10 -04:00
parent 116d8dc535
commit 74c9e4ab80
37 changed files with 66 additions and 70 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2017-2019 the original author or authors.
* Copyright 2017-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -48,7 +48,7 @@ import static org.assertj.core.api.Assertions.assertThat;
* @since 1.2.2
*/
@Disabled("This test has issues that needs to be looked into")
public class BasicAbstractMessageChannelBinderTests {
class BasicAbstractMessageChannelBinderTests {
private static ApplicationContext context;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2017-2022 the original author or authors.
* Copyright 2017-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -30,7 +30,7 @@ import static org.assertj.core.api.Assertions.assertThat;
/**
* @author Anshul Mehra
*/
public class BinderErrorChannelTests {
class BinderErrorChannelTests {
private static final LastSubscriberMessageHandler FINAL_HANDLER = message -> {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016-2022 the original author or authors.
* Copyright 2016-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -37,7 +37,7 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Marius Bogoevici
* @author Oleg Zhurakousky
*/
public class ErrorBindingTests {
class ErrorBindingTests {
@Test
public void testConfigurationWithDefaultErrorHandler() {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2018-2022 the original author or authors.
* Copyright 2018-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -68,7 +68,7 @@ import static org.mockito.Mockito.verify;
*
*/
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
public class PollableConsumerTests {
class PollableConsumerTests {
private ApplicationContext context;
@@ -586,7 +586,7 @@ public class PollableConsumerTests {
private boolean running = false;
public LifecycleMessageSource(MessageSource<T> delegate) {
LifecycleMessageSource(MessageSource<T> delegate) {
this.delegate = delegate;
}

View File

@@ -60,7 +60,7 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Byungjun You
*
*/
public class ContentTypeTckTests {
class ContentTypeTckTests {
@Test
void stringToMapMessageStreamListener() {
@@ -703,11 +703,11 @@ public class ContentTypeTckTests {
private String name;
public Person() {
Person() {
this(null);
}
public Person(String name) {
Person(String name) {
this.name = name;
}
@@ -749,7 +749,7 @@ public class ContentTypeTckTests {
public static class AlwaysStringKryoMessageConverter
extends AbstractMessageConverter {
public AlwaysStringKryoMessageConverter(MimeType supportedMimeType) {
AlwaysStringKryoMessageConverter(MimeType supportedMimeType) {
super(supportedMimeType);
}

View File

@@ -91,7 +91,7 @@ import static org.mockito.Mockito.when;
* @author Chris Bono
* @author Artem Bilan
*/
public class BindingServiceTests {
class BindingServiceTests {
@SuppressWarnings({ "unchecked", "rawtypes" })
@Test

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2022-2022 the original author or authors.
* Copyright 2022-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -34,11 +34,7 @@ import org.springframework.messaging.MessageChannel;
import static org.assertj.core.api.Assertions.assertThat;
/**
*
*
*/
public class ExplicitBindingTests {
class ExplicitBindingTests {
@Test
void testExplicitBindings() {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2022-2022 the original author or authors.
* Copyright 2022-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -36,7 +36,7 @@ import static org.assertj.core.api.Assertions.assertThat;
/**
* @author Soby Chacko
*/
public class FluxMessageChannelBindingTests {
class FluxMessageChannelBindingTests {
@Test
void testFluxMessageChannelBindingWhenReactiveOptIn() {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2018-2022 the original author or authors.
* Copyright 2018-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -43,7 +43,7 @@ import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
* @author Soby Chacko
*
*/
public class BindingHandlerAdviseTests {
class BindingHandlerAdviseTests {
@Test
@Disabled

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2017-2022 the original author or authors.
* Copyright 2017-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -39,7 +39,7 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Oleg Zhurakousky
*
*/
public class BindingServiceConfigurationTests {
class BindingServiceConfigurationTests {
@Test
void testErroChannelDistributesMessagesInCaseOfException() {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2018-2022 the original author or authors.
* Copyright 2018-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -41,7 +41,7 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Oleg Zhurakousky
* @author Soby Chacko
*/
public class RetryTemplateTests {
class RetryTemplateTests {
@SuppressWarnings("rawtypes")
@Test

View File

@@ -44,7 +44,7 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy;
* @author Original authors
* @author Soby Chacko
*/
public class ActuatorBindingsTest {
class ActuatorBindingsTest {
/*
* Even though this test performs some simple assertions, the main purpose for it is to validate that

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2019-2022 the original author or authors.
* Copyright 2019-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -40,7 +40,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*
* TODO: Need to rewrite this test.
*/
public class DynamicDestinationFunctionTests {
class DynamicDestinationFunctionTests {
@AfterAll
public static void after() {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2019-2022 the original author or authors.
* Copyright 2019-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -42,7 +42,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*
* @since 3.0
*/
public class FunctionBatchingTests {
class FunctionBatchingTests {
@Test
void testMessageBatchConfigurationWithKafkaNull() {

View File

@@ -39,7 +39,7 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Oleg Zhurakousky
*
*/
public class FunctionPostProcessingTests {
class FunctionPostProcessingTests {
@Test
void testNothingIsBroken() {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2018-2022 the original author or authors.
* Copyright 2018-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -45,7 +45,7 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Oleg Zhurakousky
* @author Artem Bilan
*/
public class GreenfieldFunctionEnableBindingTests {
class GreenfieldFunctionEnableBindingTests {
@Test
void testProcessorFromFunction() {

View File

@@ -88,7 +88,7 @@ import static org.junit.Assert.fail;
* @author Soby Chacko
*
*/
public class ImplicitFunctionBindingTests {
class ImplicitFunctionBindingTests {
@AfterEach
public void after() {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2019-2022 the original author or authors.
* Copyright 2019-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -52,7 +52,7 @@ import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
* @author Oleg Zhurakousky
*
*/
public class MultipleInputOutputFunctionTests {
class MultipleInputOutputFunctionTests {
@Test
void testFailureWithNonReactiveFunction() {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2020-2022 the original author or authors.
* Copyright 2020-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -46,7 +46,7 @@ import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
* @author Artem Bilan
*
*/
public class PollableSourceTests {
class PollableSourceTests {
@Test
void testPollableSource() {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2019-2022 the original author or authors.
* Copyright 2019-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -50,7 +50,7 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Oleg Zhurakousky
* @since 2.2.1
*/
public class RoutingFunctionTests {
class RoutingFunctionTests {
@BeforeAll

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2020-2020 the original author or authors.
* Copyright 2020-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -41,7 +41,7 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Oleg Zhurakousky
*
*/
public class ScenarioTests {
class ScenarioTests {
@Test
void test2106() {

View File

@@ -81,7 +81,7 @@ import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
* @author Soby Chacko
*
*/
public class StreamBridgeTests {
class StreamBridgeTests {
@BeforeAll
public static void before() {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2019-2022 the original author or authors.
* Copyright 2019-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -34,7 +34,7 @@ import org.springframework.messaging.Message;
* @author Oleg Zhurakousky
*
*/
public class GH1801Test {
class GH1801Test {
@Test
void test() {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2022-2022 the original author or authors.
* Copyright 2022-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -27,7 +27,7 @@ import org.springframework.messaging.Message;
import static org.assertj.core.api.Assertions.assertThat;
public class KotlinConfigurationTests {
class KotlinConfigurationTests {
@Test
void testKotlinSupplierPollableBean() {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2021-2021 the original author or authors.
* Copyright 2021-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -32,7 +32,7 @@ import org.springframework.util.ReflectionUtils;
* @author Oleg Zhurakousky
*
*/
public class TestChannelBinderTests {
class TestChannelBinderTests {
@Test
public void test() throws Exception {

View File

@@ -40,7 +40,7 @@ import static org.mockito.Mockito.verifyNoMoreInteractions;
*/
@SpringBootTest(classes = BindingTargetTests.TestFooChannels.class, properties = {"spring.cloud.stream.default-binder=mock",
"spring.cloud.function.definition=process1;process2"})
public class BindingTargetTests {
class BindingTargetTests {
@Autowired
private BinderFactory binderFactory;

View File

@@ -27,7 +27,7 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Myeonghyeon Lee
*
*/
public class DefaultBinderTests {
class DefaultBinderTests {
@Test
void testDefaultBinderIsPaused() {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2018-2022 the original author or authors.
* Copyright 2018-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -31,7 +31,7 @@ import static org.assertj.core.api.Assertions.assertThat;
/**
* @author Soby Chacko
*/
public class ExtendedPropertiesDefaultTests {
class ExtendedPropertiesDefaultTests {
@Test
void testExtendedDefaultProducerProperties() {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2022 the original author or authors.
* Copyright 2015-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -42,7 +42,7 @@ import static org.mockito.Mockito.verifyNoMoreInteractions;
* @author Janne Valkealahti
* @author Soby Chacko
*/
public class InputOutputBindingOrderTest {
class InputOutputBindingOrderTest {
@SuppressWarnings({ "rawtypes", "unchecked" })
@Test

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2022 the original author or authors.
* Copyright 2002-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -33,7 +33,7 @@ import static org.assertj.core.api.Assertions.fail;
* @author Ilayaperumal Gopinathan
* @since 1.0
*/
public class MessageConverterTests {
class MessageConverterTests {
@Test
void testHeaderEmbedding() throws Exception {

View File

@@ -38,7 +38,7 @@ import static org.mockito.Mockito.verifyNoMoreInteractions;
* @author Soby Chacko
*/
@SpringBootTest(classes = SinkBindingWithDefaultsTests.TestSink.class, properties = "spring.cloud.stream.defaultBinder=mock")
public class SinkBindingWithDefaultsTests {
class SinkBindingWithDefaultsTests {
@Autowired
private BinderFactory binderFactory;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2018-2022 the original author or authors.
* Copyright 2018-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -34,7 +34,7 @@ import static org.mockito.Mockito.mock;
*
*/
@SuppressWarnings("unchecked")
public class BindingLifecycleTests {
class BindingLifecycleTests {
@Test
void testInputBindingLifecycle() {

View File

@@ -41,7 +41,7 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Oleg Zhurakousky
* @author Soby Chacko
*/
public class CustomPartitionedProducerTest {
class CustomPartitionedProducerTest {
@Test
void testCustomPartitionedProducer() {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2017-2022 the original author or authors.
* Copyright 2017-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -42,7 +42,7 @@ import static org.assertj.core.api.Assertions.fail;
* @since 1.3
*
*/
public class MessageConverterConfigurerTests {
class MessageConverterConfigurerTests {
// @Test
void testConfigureOutputChannelWithBadContentType() {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2019-2022 the original author or authors.
* Copyright 2019-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -36,7 +36,7 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Oleg Zhurakousky
*
*/
public class ArgumentResolversTests {
class ArgumentResolversTests {
@SuppressWarnings({ "rawtypes", "unchecked" })
@Test

View File

@@ -49,7 +49,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
@SpringBootTest(classes = SpelExpressionConverterConfigurationTests.Config.class, properties = {
"expression: a.b" })
public class SpelExpressionConverterConfigurationTests {
class SpelExpressionConverterConfigurationTests {
@Autowired
private Pojo pojo;

View File

@@ -47,7 +47,7 @@ import static org.mockito.Mockito.verifyNoMoreInteractions;
* @author Soby Chacko
*/
@SpringBootTest(classes = PartitionedConsumerTest.TestSink.class, properties = "spring.cloud.stream.default-binder=mock")
public class PartitionedConsumerTest {
class PartitionedConsumerTest {
@Autowired
private BinderFactory binderFactory;