Make test classes package private
See gh-1184
This commit is contained in:
@@ -43,7 +43,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
*/
|
||||
public class GraphQlTesterBuilderTests extends GraphQlTesterTestSupport {
|
||||
class GraphQlTesterBuilderTests extends GraphQlTesterTestSupport {
|
||||
|
||||
private static final String DOCUMENT = "{ Query }";
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy;
|
||||
* @author Rossen Stoyanchev
|
||||
* @author Brian Clozel
|
||||
*/
|
||||
public class GraphQlTesterTests extends GraphQlTesterTestSupport {
|
||||
class GraphQlTesterTests extends GraphQlTesterTestSupport {
|
||||
|
||||
@Test
|
||||
void missingDocumentByName() {
|
||||
|
||||
@@ -48,10 +48,10 @@ import org.springframework.util.MimeType;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
/**
|
||||
*
|
||||
* Tests for {@link RSocketGraphQlTester.Builder}.
|
||||
* @author Rossen Stoyanchev
|
||||
*/
|
||||
public class RSocketGraphQlTesterBuilderTests {
|
||||
class RSocketGraphQlTesterBuilderTests {
|
||||
|
||||
private static final String DOCUMENT = "{ Query }";
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ import static org.springframework.web.reactive.function.server.RouterFunctions.r
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
*/
|
||||
public class WebGraphQlTesterBuilderTests {
|
||||
class WebGraphQlTesterBuilderTests {
|
||||
|
||||
private static final String DOCUMENT = "{ Query }";
|
||||
|
||||
|
||||
@@ -57,6 +57,6 @@ public enum ErrorType implements ErrorClassification {
|
||||
* {@link graphql.schema.DataFetcher} encountered an unexpected condition that
|
||||
* prevented it from fetching the data value.
|
||||
*/
|
||||
INTERNAL_ERROR;
|
||||
INTERNAL_ERROR
|
||||
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException
|
||||
* Unit tests for {@link DefaultClientGraphQlResponse}.
|
||||
* @author Rossen Stoyanchev
|
||||
*/
|
||||
public class DefaultGraphQlClientResponseTests {
|
||||
class DefaultGraphQlClientResponseTests {
|
||||
|
||||
private static final ObjectMapper mapper = new ObjectMapper();
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
*/
|
||||
public class GraphQlClientBuilderTests extends GraphQlClientTestSupport {
|
||||
class GraphQlClientBuilderTests extends GraphQlClientTestSupport {
|
||||
|
||||
private static final String DOCUMENT = "{ Query }";
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy;
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
*/
|
||||
public class GraphQlClientTests extends GraphQlClientTestSupport {
|
||||
class GraphQlClientTests extends GraphQlClientTestSupport {
|
||||
|
||||
@Test
|
||||
void retrieveEntity() {
|
||||
|
||||
@@ -41,7 +41,7 @@ import static org.junit.jupiter.params.provider.Arguments.arguments;
|
||||
*
|
||||
* @see <a href="https://graphql.github.io/graphql-over-http/draft/#sec-application-graphql-response-json">GraphQL over HTTP specification</a>
|
||||
*/
|
||||
public class HttpGraphQlClientProtocolTests {
|
||||
class HttpGraphQlClientProtocolTests {
|
||||
|
||||
private MockWebServer server;
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ import static org.springframework.web.reactive.function.server.RouterFunctions.r
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
*/
|
||||
public class HttpSyncGraphQlClientBuilderTests {
|
||||
class HttpSyncGraphQlClientBuilderTests {
|
||||
|
||||
private static final String DOCUMENT = "{ Query }";
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
*/
|
||||
public class RSocketGraphQlClientBuilderTests {
|
||||
class RSocketGraphQlClientBuilderTests {
|
||||
|
||||
private static final String DOCUMENT = "{ Query }";
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
*/
|
||||
public class RSocketGraphQlTransportTests {
|
||||
class RSocketGraphQlTransportTests {
|
||||
|
||||
private static final Jackson2JsonEncoder jsonEncoder = new Jackson2JsonEncoder();
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ import static org.springframework.web.reactive.function.server.RouterFunctions.r
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
*/
|
||||
public class WebGraphQlClientBuilderTests {
|
||||
class WebGraphQlClientBuilderTests {
|
||||
|
||||
private static final String DOCUMENT = "{ Query }";
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ import static org.mockito.Mockito.mock;
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
*/
|
||||
public class WebSocketGraphQlTransportTests {
|
||||
class WebSocketGraphQlTransportTests {
|
||||
|
||||
private static final Duration TIMEOUT = Duration.ofSeconds(5);
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ import static org.assertj.core.api.Assertions.assertThatIllegalStateException;
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
*/
|
||||
public class EntityMappingInvocationTests {
|
||||
class EntityMappingInvocationTests {
|
||||
|
||||
private static final Resource federationSchema = new ClassPathResource("books/federation-schema.graphqls");
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
* Tests for registration of mappings with schema interfaces types.
|
||||
* @author Rossen Stoyanchev
|
||||
*/
|
||||
public class AnnotatedControllerConfigurerInterfaceMappingTests {
|
||||
class AnnotatedControllerConfigurerInterfaceMappingTests {
|
||||
|
||||
private static final String SCHEMA = """
|
||||
type Query {
|
||||
|
||||
@@ -33,7 +33,7 @@ import static org.mockito.Mockito.mock;
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 1.2.0
|
||||
*/
|
||||
public class AnnotatedControllerConfigurerTests {
|
||||
class AnnotatedControllerConfigurerTests {
|
||||
|
||||
@Test
|
||||
void customArgumentResolvers() {
|
||||
|
||||
@@ -50,7 +50,7 @@ import static org.assertj.core.api.Assertions.assertThatIllegalStateException;
|
||||
* @author Rossen Stoyanchev
|
||||
* @author Brian Clozel
|
||||
*/
|
||||
public class AnnotatedControllerExceptionResolverTests {
|
||||
class AnnotatedControllerExceptionResolverTests {
|
||||
|
||||
private final DataFetchingEnvironment environment =
|
||||
DataFetchingEnvironmentImpl.newDataFetchingEnvironment().build();
|
||||
|
||||
@@ -54,7 +54,7 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy;
|
||||
* @author Rossen Stoyanchev
|
||||
*/
|
||||
@SuppressWarnings({"rawtypes", "unused"})
|
||||
public class BatchMappingDetectionTests {
|
||||
class BatchMappingDetectionTests {
|
||||
|
||||
private final BatchLoaderRegistry batchLoaderRegistry = new DefaultBatchLoaderRegistry();
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ import static org.junit.jupiter.params.provider.Arguments.arguments;
|
||||
* @author Rossen Stoyanchev
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
public class BatchMappingInvocationTests extends BatchMappingTestSupport {
|
||||
class BatchMappingInvocationTests extends BatchMappingTestSupport {
|
||||
|
||||
private static Stream<Arguments> controllers() {
|
||||
return Stream.of(
|
||||
|
||||
@@ -52,7 +52,7 @@ import static org.junit.jupiter.params.provider.Arguments.arguments;
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
*/
|
||||
public class BatchMappingPrincipalMethodArgumentResolverTests extends BatchMappingTestSupport {
|
||||
class BatchMappingPrincipalMethodArgumentResolverTests extends BatchMappingTestSupport {
|
||||
|
||||
private final Authentication authentication = new TestingAuthenticationToken(new Object(), new Object());
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ import static org.assertj.core.api.Assertions.assertThatIllegalStateException;
|
||||
* Unit tests for {@link ContextValueMethodArgumentResolver}.
|
||||
* @author Rossen Stoyanchev
|
||||
*/
|
||||
public class ContextValueMethodArgumentResolverTests {
|
||||
class ContextValueMethodArgumentResolverTests {
|
||||
|
||||
private static final Method method = ClassUtils.getMethod(
|
||||
ContextValueMethodArgumentResolverTests.class, "handle", (Class<?>[]) null);
|
||||
|
||||
@@ -49,7 +49,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
*/
|
||||
public class DataFetcherHandlerMethodTests {
|
||||
class DataFetcherHandlerMethodTests {
|
||||
|
||||
@Test
|
||||
void annotatedMethodsOnInterface() {
|
||||
|
||||
@@ -36,7 +36,7 @@ import static org.mockito.Mockito.mock;
|
||||
* Unit tests for {@link DataFetchingEnvironmentMethodArgumentResolver}.
|
||||
* @author Rossen Stoyanchev
|
||||
*/
|
||||
public class DataFetchingEnvironmentArgumentResolverTests {
|
||||
class DataFetchingEnvironmentArgumentResolverTests {
|
||||
|
||||
private static final Method handleMethod = ClassUtils.getMethod(
|
||||
DataFetchingEnvironmentArgumentResolverTests.class, "handle", (Class<?>[]) null);
|
||||
|
||||
@@ -40,7 +40,7 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy;
|
||||
* Unit tests for {@link DataLoaderMethodArgumentResolver}.
|
||||
* @author Rossen Stoyanchev
|
||||
*/
|
||||
public class DataLoaderArgumentResolverTests {
|
||||
class DataLoaderArgumentResolverTests {
|
||||
|
||||
private static final Method method = ClassUtils.getMethod(
|
||||
DataLoaderArgumentResolverTests.class, "handle", (Class<?>[]) null);
|
||||
|
||||
@@ -38,7 +38,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
* Unit tests for {@link ContextValueMethodArgumentResolver}.
|
||||
* @author Rossen Stoyanchev
|
||||
*/
|
||||
public class LocalContextValueMethodArgumentResolverTests {
|
||||
class LocalContextValueMethodArgumentResolverTests {
|
||||
|
||||
private static final Method method = ClassUtils.getMethod(
|
||||
LocalContextValueMethodArgumentResolverTests.class, "handle", (Class<?>[]) null);
|
||||
|
||||
@@ -37,7 +37,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
* Unit tests for {@link ProjectedPayloadMethodArgumentResolver}.
|
||||
* @author Rossen Stoyanchev
|
||||
*/
|
||||
public class ProjectedPayloadMethodArgumentResolverTests extends ArgumentResolverTestSupport {
|
||||
class ProjectedPayloadMethodArgumentResolverTests extends ArgumentResolverTestSupport {
|
||||
|
||||
private ProjectedPayloadMethodArgumentResolver resolver;
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
*/
|
||||
public class SchemaMappingDetectionTests {
|
||||
class SchemaMappingDetectionTests {
|
||||
|
||||
@Test
|
||||
void registerWithDefaultCoordinates() {
|
||||
|
||||
@@ -66,7 +66,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
* @author Rossen Stoyanchev
|
||||
* @author Mark Paluch
|
||||
*/
|
||||
public class SchemaMappingInvocationTests {
|
||||
class SchemaMappingInvocationTests {
|
||||
|
||||
@Test
|
||||
void queryWithScalarArgument() {
|
||||
|
||||
@@ -44,7 +44,7 @@ import org.springframework.stereotype.Controller;
|
||||
* @author Rossen Stoyanchev
|
||||
* @author Oliver Drotbohm
|
||||
*/
|
||||
public class SchemaMappingPaginationTests {
|
||||
class SchemaMappingPaginationTests {
|
||||
|
||||
|
||||
@Test
|
||||
|
||||
@@ -61,7 +61,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
*/
|
||||
public class SchemaMappingPrincipalMethodArgumentResolverTests {
|
||||
class SchemaMappingPrincipalMethodArgumentResolverTests {
|
||||
|
||||
private final PrincipalMethodArgumentResolver resolver = new PrincipalMethodArgumentResolver();
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
*/
|
||||
public class SortMethodArgumentResolverTests extends ArgumentResolverTestSupport {
|
||||
class SortMethodArgumentResolverTests extends ArgumentResolverTestSupport {
|
||||
|
||||
private final SortMethodArgumentResolver resolver = new SortMethodArgumentResolver(new MySortStrategy());
|
||||
|
||||
|
||||
@@ -150,6 +150,6 @@ class SourceMethodArgumentResolverTests extends ArgumentResolverTestSupport {
|
||||
}
|
||||
|
||||
enum Format {
|
||||
PAPERBACK, EBOOK;
|
||||
PAPERBACK, EBOOK
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
* Unit tests for {@link SubrangeMethodArgumentResolver}.
|
||||
* @author Rossen Stoyanchev
|
||||
*/
|
||||
public class SubrangeMethodArgumentResolverTests extends ArgumentResolverTestSupport {
|
||||
class SubrangeMethodArgumentResolverTests extends ArgumentResolverTestSupport {
|
||||
|
||||
private final SubrangeMethodArgumentResolver<MyPosition> resolver =
|
||||
new SubrangeMethodArgumentResolver<>(new MyPositionCursorStrategy());
|
||||
|
||||
@@ -25,7 +25,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
*/
|
||||
public class Base64CursorEncoderTests {
|
||||
class Base64CursorEncoderTests {
|
||||
|
||||
private final Base64CursorEncoder encoder = new Base64CursorEncoder();
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
*/
|
||||
public class ConnectionFieldTypeVisitorTests {
|
||||
class ConnectionFieldTypeVisitorTests {
|
||||
|
||||
|
||||
@Test
|
||||
|
||||
@@ -33,7 +33,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
*/
|
||||
public class JsonKeysetCursorStrategyTests {
|
||||
class JsonKeysetCursorStrategyTests {
|
||||
|
||||
private final JsonKeysetCursorStrategy cursorStrategy = new JsonKeysetCursorStrategy();
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
*/
|
||||
public class PropertySelectionTests {
|
||||
class PropertySelectionTests {
|
||||
|
||||
@Test
|
||||
void propertySelectionWithConnection() {
|
||||
|
||||
@@ -34,7 +34,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
* Unit tests for {@link RepositoryUtils}.
|
||||
*/
|
||||
@SuppressWarnings("OptionalGetWithoutIsPresent")
|
||||
public class RepositoryUtilsTests {
|
||||
class RepositoryUtilsTests {
|
||||
|
||||
private final CursorStrategy<ScrollPosition> cursorStrategy = RepositoryUtils.defaultCursorStrategy();
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
* @author Rossen Stoyanchev
|
||||
* @author Oliver Drotbohm
|
||||
*/
|
||||
public class ScrollPositionCursorStrategyTests {
|
||||
class ScrollPositionCursorStrategyTests {
|
||||
|
||||
private final ScrollPositionCursorStrategy cursorStrategy = new ScrollPositionCursorStrategy();
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
* @author Rossen Stoyanchev
|
||||
* @author Oliver Drotbohm
|
||||
*/
|
||||
public class ScrollSubrangeTests {
|
||||
class ScrollSubrangeTests {
|
||||
|
||||
@Test
|
||||
void offsetForward() {
|
||||
|
||||
@@ -33,7 +33,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
*/
|
||||
public class SliceConnectionAdapterTests {
|
||||
class SliceConnectionAdapterTests {
|
||||
|
||||
private final SliceConnectionAdapter adapter = new SliceConnectionAdapter(new ScrollPositionCursorStrategy());
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
* @author Rossen Stoyanchev
|
||||
* @author Oliver Drotbohm
|
||||
*/
|
||||
public class WindowConnectionAdapterTests {
|
||||
class WindowConnectionAdapterTests {
|
||||
|
||||
private final WindowConnectionAdapter adapter = new WindowConnectionAdapter(new ScrollPositionCursorStrategy());
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
*/
|
||||
public class BatchLoadingTests {
|
||||
class BatchLoadingTests {
|
||||
|
||||
private final BatchLoaderRegistry registry = new DefaultBatchLoaderRegistry();
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public class ClassNameTypeResolverTests {
|
||||
class ClassNameTypeResolverTests {
|
||||
|
||||
private static final String schema = """
|
||||
type Query {
|
||||
|
||||
@@ -42,7 +42,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
* Tests for resolving exceptions via {@link SubscriptionExceptionResolver}.
|
||||
* @author Rossen Stoyanchev
|
||||
*/
|
||||
public class CompositeSubscriptionExceptionResolverTests {
|
||||
class CompositeSubscriptionExceptionResolverTests {
|
||||
|
||||
private static final Duration TIMEOUT = Duration.ofSeconds(5);
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ import org.springframework.graphql.ResponseHelper;
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 1.2.0
|
||||
*/
|
||||
public class ConnectionTypeDefinitionConfigurerTests {
|
||||
class ConnectionTypeDefinitionConfigurerTests {
|
||||
|
||||
@Test
|
||||
void connectionTypeGeneration() {
|
||||
|
||||
@@ -61,7 +61,7 @@ import static org.awaitility.Awaitility.await;
|
||||
* @author Brian Clozel
|
||||
*/
|
||||
@SuppressWarnings("ReactiveStreamsUnusedPublisher")
|
||||
public class ContextDataFetcherDecoratorTests {
|
||||
class ContextDataFetcherDecoratorTests {
|
||||
|
||||
private static final String SCHEMA_CONTENT = """
|
||||
directive @UpperCase on FIELD_DEFINITION \
|
||||
|
||||
@@ -41,7 +41,7 @@ import static org.assertj.core.api.AssertionsForInterfaceTypes.assertThat;
|
||||
* Unit tests for {@link DefaultBatchLoaderRegistry}.
|
||||
* @author Rossen Stoyanchev
|
||||
*/
|
||||
public class DefaultBatchLoaderRegistryTests {
|
||||
class DefaultBatchLoaderRegistryTests {
|
||||
|
||||
private final BatchLoaderRegistry batchLoaderRegistry =
|
||||
new DefaultBatchLoaderRegistry(() -> {
|
||||
|
||||
@@ -42,7 +42,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
*/
|
||||
public class DefaultExecutionGraphQlServiceTests {
|
||||
class DefaultExecutionGraphQlServiceTests {
|
||||
|
||||
@Test
|
||||
void customDataLoaderRegistry() {
|
||||
|
||||
@@ -47,7 +47,7 @@ import static org.mockito.Mockito.mock;
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
*/
|
||||
public class DefaultSchemaResourceGraphQlSourceBuilderTests {
|
||||
class DefaultSchemaResourceGraphQlSourceBuilderTests {
|
||||
|
||||
@Test // gh-230
|
||||
void duplicateResourcesAreIgnored() {
|
||||
|
||||
@@ -38,7 +38,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
* Tests for {@link ExceptionResolversExceptionHandler}.
|
||||
* @author Rossen Stoyanchev
|
||||
*/
|
||||
public class ExceptionResolversExceptionHandlerTests {
|
||||
class ExceptionResolversExceptionHandlerTests {
|
||||
|
||||
private final GraphQlSetup graphQlSetup =
|
||||
GraphQlSetup.schemaContent("type Query { greeting: String }")
|
||||
|
||||
@@ -29,7 +29,7 @@ import org.springframework.stereotype.Controller;
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
*/
|
||||
public class SchemaMappingInspectorInterfaceTests extends SchemaMappingInspectorTestSupport {
|
||||
class SchemaMappingInspectorInterfaceTests extends SchemaMappingInspectorTestSupport {
|
||||
|
||||
private static final String schema = """
|
||||
type Query {
|
||||
|
||||
@@ -30,7 +30,7 @@ import org.springframework.stereotype.Controller;
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
*/
|
||||
public class SchemaMappingInspectorUnionTests extends SchemaMappingInspectorTestSupport {
|
||||
class SchemaMappingInspectorUnionTests extends SchemaMappingInspectorTestSupport {
|
||||
|
||||
private static final String schema = """
|
||||
type Query {
|
||||
|
||||
@@ -44,7 +44,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
* Unit tests for {@link GraphQlWebSocketHandler}.
|
||||
* @author Rossen Stoyanchev
|
||||
*/
|
||||
public class GraphQlRSocketHandlerTests {
|
||||
class GraphQlRSocketHandlerTests {
|
||||
|
||||
private static final Duration TIMEOUT = Duration.ofSeconds(5);
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
/**
|
||||
* Tests for {@link WebGraphQlHandler}, common to both HTTP and WebSocket.
|
||||
*/
|
||||
public class WebGraphQlHandlerTests {
|
||||
class WebGraphQlHandlerTests {
|
||||
|
||||
private static final WebGraphQlRequest webInput = new WebGraphQlRequest(
|
||||
URI.create("https://abc.org"), new HttpHeaders(), null, null, Collections.emptyMap(),
|
||||
|
||||
@@ -38,7 +38,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
/**
|
||||
* Unit tests for a {@link WebGraphQlInterceptor} chain.
|
||||
*/
|
||||
public class WebGraphQlInterceptorTests {
|
||||
class WebGraphQlInterceptorTests {
|
||||
|
||||
private static final WebGraphQlRequest webRequest = new WebGraphQlRequest(
|
||||
URI.create("http://abc.org"), new HttpHeaders(), null, null, Collections.emptyMap(),
|
||||
|
||||
@@ -33,7 +33,7 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy;
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
*/
|
||||
public class BearerTokenAuthenticationExtractorTests {
|
||||
class BearerTokenAuthenticationExtractorTests {
|
||||
|
||||
private static final BearerTokenAuthenticationExtractor extractor = new BearerTokenAuthenticationExtractor();
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ import static org.springframework.graphql.server.support.BearerTokenAuthenticati
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
*/
|
||||
public class AuthenticationWebSocketInterceptorTests {
|
||||
class AuthenticationWebSocketInterceptorTests {
|
||||
|
||||
private static final String ATTRIBUTE_KEY = AuthenticationWebSocketInterceptor.class.getName() + ".AUTHENTICATION";
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
* Tests for {@link GraphQlHttpHandler}.
|
||||
* @author Rossen Stoyanchev
|
||||
*/
|
||||
public class GraphQlHttpHandlerTests {
|
||||
class GraphQlHttpHandlerTests {
|
||||
|
||||
private static final List<HttpMessageReader<?>> MESSAGE_READERS =
|
||||
List.of(new DecoderHttpMessageReader<>(new Jackson2JsonDecoder()));
|
||||
|
||||
@@ -45,7 +45,7 @@ import org.springframework.web.reactive.function.server.ServerResponse;
|
||||
*
|
||||
* @see <a href="https://graphql.github.io/graphql-over-http/draft/#sec-application-graphql-response-json">GraphQL over HTTP specification</a>
|
||||
*/
|
||||
public class GraphQlHttpProtocolTests {
|
||||
class GraphQlHttpProtocolTests {
|
||||
|
||||
private GraphQlSetup greetingSetup = GraphQlSetup.schemaContent("type Query { greeting: String }")
|
||||
.queryFetcher("greeting", (env) -> "Hello");
|
||||
|
||||
@@ -65,7 +65,7 @@ import static org.springframework.graphql.server.support.GraphQlWebSocketMessage
|
||||
/**
|
||||
* Unit tests for {@link GraphQlWebSocketHandler}.
|
||||
*/
|
||||
public class GraphQlWebSocketHandlerTests extends WebSocketHandlerTestSupport {
|
||||
class GraphQlWebSocketHandlerTests extends WebSocketHandlerTestSupport {
|
||||
|
||||
private static final Jackson2JsonDecoder decoder = new Jackson2JsonDecoder();
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ import static org.springframework.graphql.server.support.BearerTokenAuthenticati
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
*/
|
||||
public class AuthenticationWebSocketInterceptorTests {
|
||||
class AuthenticationWebSocketInterceptorTests {
|
||||
|
||||
private static final String ATTRIBUTE_KEY = AuthenticationWebSocketInterceptor.class.getName() + ".AUTHENTICATION";
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ import static org.assertj.core.api.Assertions.assertThatNoException;
|
||||
* @author Rossen Stoyanchev
|
||||
* @author Brian Clozel
|
||||
*/
|
||||
public class GraphQlHttpHandlerTests {
|
||||
class GraphQlHttpHandlerTests {
|
||||
|
||||
private static final List<HttpMessageConverter<?>> MESSAGE_READERS =
|
||||
List.of(new MappingJackson2HttpMessageConverter(), new ByteArrayHttpMessageConverter());
|
||||
|
||||
@@ -50,7 +50,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
*
|
||||
* @see <a href="https://graphql.github.io/graphql-over-http/draft/#sec-application-graphql-response-json">GraphQL over HTTP specification</a>
|
||||
*/
|
||||
public class GraphQlHttpProtocolTests {
|
||||
class GraphQlHttpProtocolTests {
|
||||
|
||||
|
||||
private GraphQlSetup greetingSetup = GraphQlSetup.schemaContent("type Query { greeting: String }")
|
||||
|
||||
@@ -71,7 +71,7 @@ import static org.springframework.graphql.server.support.GraphQlWebSocketMessage
|
||||
/**
|
||||
* Unit tests for {@link GraphQlWebSocketHandler}.
|
||||
*/
|
||||
public class GraphQlWebSocketHandlerTests extends WebSocketHandlerTestSupport {
|
||||
class GraphQlWebSocketHandlerTests extends WebSocketHandlerTestSupport {
|
||||
|
||||
private static final HttpMessageConverter<?> converter = new MappingJackson2HttpMessageConverter();
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
* Unit tests for {@link ResourceDocumentSource}.
|
||||
* @author Rossen Stoyanchev
|
||||
*/
|
||||
public class CachingDocumentSourceTests {
|
||||
class CachingDocumentSourceTests {
|
||||
|
||||
private CachingDocumentSource source;
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
* Unit tests for {@link ResourceDocumentSource}.
|
||||
* @author Rossen Stoyanchev
|
||||
*/
|
||||
public class ResourceDocumentSourceTests {
|
||||
class ResourceDocumentSourceTests {
|
||||
|
||||
private ResourceDocumentSource source;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user