Use consistently *KotlinTests naming for Kotlin tests
Closes gh-30837
This commit is contained in:
parent
fb17e283d1
commit
b3de1b8e95
|
@ -25,7 +25,7 @@ import org.junit.jupiter.api.Test
|
||||||
* @author Sebastien Deleuze
|
* @author Sebastien Deleuze
|
||||||
*/
|
*/
|
||||||
@Suppress("unused", "UNUSED_PARAMETER")
|
@Suppress("unused", "UNUSED_PARAMETER")
|
||||||
class KotlinBeanUtilsTests {
|
class BeanUtilsKotlinTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun `Instantiate immutable class`() {
|
fun `Instantiate immutable class`() {
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2019 the original author or authors.
|
* Copyright 2002-2023 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -31,7 +31,7 @@ import org.springframework.beans.testfixture.beans.TestBean
|
||||||
* @author Juergen Hoeller
|
* @author Juergen Hoeller
|
||||||
* @author Sebastien Deleuze
|
* @author Sebastien Deleuze
|
||||||
*/
|
*/
|
||||||
class KotlinAutowiredTests {
|
class AutowiredKotlinTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun `Autowiring with target`() {
|
fun `Autowiring with target`() {
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2019 the original author or authors.
|
* Copyright 2002-2023 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -16,14 +16,18 @@
|
||||||
|
|
||||||
package org.springframework.context.annotation
|
package org.springframework.context.annotation
|
||||||
|
|
||||||
|
|
||||||
import org.assertj.core.api.Assertions.assertThat
|
import org.assertj.core.api.Assertions.assertThat
|
||||||
import org.assertj.core.api.Assertions.assertThatExceptionOfType
|
import org.assertj.core.api.Assertions.assertThatExceptionOfType
|
||||||
import org.junit.jupiter.api.Test
|
import org.junit.jupiter.api.Test
|
||||||
import org.springframework.beans.factory.getBean
|
import org.springframework.beans.factory.getBean
|
||||||
import org.springframework.beans.factory.parsing.BeanDefinitionParsingException
|
import org.springframework.beans.factory.parsing.BeanDefinitionParsingException
|
||||||
|
|
||||||
class KotlinConfigurationClassTests {
|
/**
|
||||||
|
* Integration tests for Kotlin configuration classes.
|
||||||
|
*
|
||||||
|
* @author Sebastien Deleuze
|
||||||
|
*/
|
||||||
|
class ConfigurationClassKotlinTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun `Final configuration with default proxyBeanMethods value`() {
|
fun `Final configuration with default proxyBeanMethods value`() {
|
|
@ -34,7 +34,7 @@ import org.springframework.validation.beanvalidation.BeanValidationBeanRegistrat
|
||||||
*
|
*
|
||||||
* @author Sebastien Deleuze
|
* @author Sebastien Deleuze
|
||||||
*/
|
*/
|
||||||
class KotlinBeanValidationBeanRegistrationAotProcessorTests {
|
class BeanValidationBeanRegistrationAotProcessorKotlinTests {
|
||||||
|
|
||||||
private val processor = BeanValidationBeanRegistrationAotProcessor()
|
private val processor = BeanValidationBeanRegistrationAotProcessor()
|
||||||
|
|
|
@ -32,7 +32,7 @@ import org.springframework.validation.annotation.Validated
|
||||||
* @author Sebastien Deleuze
|
* @author Sebastien Deleuze
|
||||||
*/
|
*/
|
||||||
@Suppress("UsePropertyAccessSyntax")
|
@Suppress("UsePropertyAccessSyntax")
|
||||||
class KotlinMethodValidationTests {
|
class MethodValidationKotlinTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun parameterValidation() {
|
fun parameterValidation() {
|
|
@ -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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -27,7 +27,7 @@ import java.lang.reflect.Method
|
||||||
*
|
*
|
||||||
* @author Sebastien Deleuze
|
* @author Sebastien Deleuze
|
||||||
*/
|
*/
|
||||||
class KotlinBindingReflectionHintsRegistrarTests {
|
class BindingReflectionHintsRegistrarKotlinTests {
|
||||||
|
|
||||||
private val bindingRegistrar = BindingReflectionHintsRegistrar()
|
private val bindingRegistrar = BindingReflectionHintsRegistrar()
|
||||||
|
|
|
@ -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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -19,7 +19,12 @@ package org.springframework.core
|
||||||
import org.assertj.core.api.Assertions.assertThat
|
import org.assertj.core.api.Assertions.assertThat
|
||||||
import org.junit.jupiter.api.Test
|
import org.junit.jupiter.api.Test
|
||||||
|
|
||||||
class KotlinBridgeMethodResolverTests {
|
/**
|
||||||
|
* Kotlin tests for [BridgeMethodResolver].
|
||||||
|
*
|
||||||
|
* @author Sebastien Deleuzes
|
||||||
|
*/
|
||||||
|
class BridgeMethodResolverKotlinTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun findBridgedMethod() {
|
fun findBridgedMethod() {
|
|
@ -28,7 +28,12 @@ import reactor.test.StepVerifier
|
||||||
import kotlin.coroutines.Continuation
|
import kotlin.coroutines.Continuation
|
||||||
import kotlin.coroutines.coroutineContext
|
import kotlin.coroutines.coroutineContext
|
||||||
|
|
||||||
class KotlinCoroutinesUtilsTests {
|
/**
|
||||||
|
* Kotlin tests for [CoroutinesUtils].
|
||||||
|
*
|
||||||
|
* @author Sebastien Deleuze
|
||||||
|
*/
|
||||||
|
class CoroutinesUtilsTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun deferredToMono() {
|
fun deferredToMono() {
|
||||||
|
@ -56,7 +61,7 @@ class KotlinCoroutinesUtilsTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun invokeSuspendingFunctionWithNullContinuationParameter() {
|
fun invokeSuspendingFunctionWithNullContinuationParameter() {
|
||||||
val method = KotlinCoroutinesUtilsTests::class.java.getDeclaredMethod("suspendingFunction", String::class.java, Continuation::class.java)
|
val method = CoroutinesUtilsTests::class.java.getDeclaredMethod("suspendingFunction", String::class.java, Continuation::class.java)
|
||||||
val publisher = CoroutinesUtils.invokeSuspendingFunction(method, this, "foo", null)
|
val publisher = CoroutinesUtils.invokeSuspendingFunction(method, this, "foo", null)
|
||||||
Assertions.assertThat(publisher).isInstanceOf(Mono::class.java)
|
Assertions.assertThat(publisher).isInstanceOf(Mono::class.java)
|
||||||
StepVerifier.create(publisher)
|
StepVerifier.create(publisher)
|
||||||
|
@ -67,7 +72,7 @@ class KotlinCoroutinesUtilsTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun invokeSuspendingFunctionWithoutContinuationParameter() {
|
fun invokeSuspendingFunctionWithoutContinuationParameter() {
|
||||||
val method = KotlinCoroutinesUtilsTests::class.java.getDeclaredMethod("suspendingFunction", String::class.java, Continuation::class.java)
|
val method = CoroutinesUtilsTests::class.java.getDeclaredMethod("suspendingFunction", String::class.java, Continuation::class.java)
|
||||||
val publisher = CoroutinesUtils.invokeSuspendingFunction(method, this, "foo")
|
val publisher = CoroutinesUtils.invokeSuspendingFunction(method, this, "foo")
|
||||||
Assertions.assertThat(publisher).isInstanceOf(Mono::class.java)
|
Assertions.assertThat(publisher).isInstanceOf(Mono::class.java)
|
||||||
StepVerifier.create(publisher)
|
StepVerifier.create(publisher)
|
||||||
|
@ -78,13 +83,13 @@ class KotlinCoroutinesUtilsTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun invokeNonSuspendingFunction() {
|
fun invokeNonSuspendingFunction() {
|
||||||
val method = KotlinCoroutinesUtilsTests::class.java.getDeclaredMethod("nonSuspendingFunction", String::class.java)
|
val method = CoroutinesUtilsTests::class.java.getDeclaredMethod("nonSuspendingFunction", String::class.java)
|
||||||
Assertions.assertThatIllegalArgumentException().isThrownBy { CoroutinesUtils.invokeSuspendingFunction(method, this, "foo") }
|
Assertions.assertThatIllegalArgumentException().isThrownBy { CoroutinesUtils.invokeSuspendingFunction(method, this, "foo") }
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun invokeSuspendingFunctionWithFlow() {
|
fun invokeSuspendingFunctionWithFlow() {
|
||||||
val method = KotlinCoroutinesUtilsTests::class.java.getDeclaredMethod("suspendingFunctionWithFlow", Continuation::class.java)
|
val method = CoroutinesUtilsTests::class.java.getDeclaredMethod("suspendingFunctionWithFlow", Continuation::class.java)
|
||||||
val publisher = CoroutinesUtils.invokeSuspendingFunction(method, this)
|
val publisher = CoroutinesUtils.invokeSuspendingFunction(method, this)
|
||||||
Assertions.assertThat(publisher).isInstanceOf(Flux::class.java)
|
Assertions.assertThat(publisher).isInstanceOf(Flux::class.java)
|
||||||
StepVerifier.create(publisher)
|
StepVerifier.create(publisher)
|
||||||
|
@ -96,7 +101,7 @@ class KotlinCoroutinesUtilsTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun invokeSuspendingFunctionWithNullContinuationParameterAndContext() {
|
fun invokeSuspendingFunctionWithNullContinuationParameterAndContext() {
|
||||||
val method = KotlinCoroutinesUtilsTests::class.java.getDeclaredMethod("suspendingFunctionWithContext", String::class.java, Continuation::class.java)
|
val method = CoroutinesUtilsTests::class.java.getDeclaredMethod("suspendingFunctionWithContext", String::class.java, Continuation::class.java)
|
||||||
val context = CoroutineName("name")
|
val context = CoroutineName("name")
|
||||||
val mono = CoroutinesUtils.invokeSuspendingFunction(context, method, this, "foo", null) as Mono
|
val mono = CoroutinesUtils.invokeSuspendingFunction(context, method, this, "foo", null) as Mono
|
||||||
runBlocking {
|
runBlocking {
|
||||||
|
@ -106,7 +111,7 @@ class KotlinCoroutinesUtilsTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun invokeSuspendingFunctionWithoutContinuationParameterAndContext() {
|
fun invokeSuspendingFunctionWithoutContinuationParameterAndContext() {
|
||||||
val method = KotlinCoroutinesUtilsTests::class.java.getDeclaredMethod("suspendingFunctionWithContext", String::class.java, Continuation::class.java)
|
val method = CoroutinesUtilsTests::class.java.getDeclaredMethod("suspendingFunctionWithContext", String::class.java, Continuation::class.java)
|
||||||
val context = CoroutineName("name")
|
val context = CoroutineName("name")
|
||||||
val mono = CoroutinesUtils.invokeSuspendingFunction(context, method, this, "foo") as Mono
|
val mono = CoroutinesUtils.invokeSuspendingFunction(context, method, this, "foo") as Mono
|
||||||
runBlocking {
|
runBlocking {
|
||||||
|
@ -116,7 +121,7 @@ class KotlinCoroutinesUtilsTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun invokeNonSuspendingFunctionWithContext() {
|
fun invokeNonSuspendingFunctionWithContext() {
|
||||||
val method = KotlinCoroutinesUtilsTests::class.java.getDeclaredMethod("nonSuspendingFunction", String::class.java)
|
val method = CoroutinesUtilsTests::class.java.getDeclaredMethod("nonSuspendingFunction", String::class.java)
|
||||||
val context = CoroutineName("name")
|
val context = CoroutineName("name")
|
||||||
Assertions.assertThatIllegalArgumentException().isThrownBy { CoroutinesUtils.invokeSuspendingFunction(context, method, this, "foo") }
|
Assertions.assertThatIllegalArgumentException().isThrownBy { CoroutinesUtils.invokeSuspendingFunction(context, method, this, "foo") }
|
||||||
}
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2019 the original author or authors.
|
* Copyright 2002-2023 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -19,7 +19,7 @@ package org.springframework.core
|
||||||
import org.assertj.core.api.Assertions.assertThat
|
import org.assertj.core.api.Assertions.assertThat
|
||||||
import org.junit.jupiter.api.Test
|
import org.junit.jupiter.api.Test
|
||||||
|
|
||||||
class KotlinDefaultParameterNameDiscovererTests {
|
class DefaultParameterNameDiscovererKotlinTests {
|
||||||
|
|
||||||
private val parameterNameDiscoverer = DefaultParameterNameDiscoverer()
|
private val parameterNameDiscoverer = DefaultParameterNameDiscoverer()
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2019 the original author or authors.
|
* Copyright 2002-2023 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -27,7 +27,7 @@ import java.lang.reflect.Method
|
||||||
* @author Konrad Kaminski
|
* @author Konrad Kaminski
|
||||||
* @author Sebastien Deleuze
|
* @author Sebastien Deleuze
|
||||||
*/
|
*/
|
||||||
class KotlinGenericTypeResolverTests {
|
class GenericTypeResolverKotlinTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun methodReturnTypes() {
|
fun methodReturnTypes() {
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2019 the original author or authors.
|
* Copyright 2002-2023 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -22,7 +22,7 @@ import org.junit.jupiter.api.Test
|
||||||
import org.springframework.util.ReflectionUtils
|
import org.springframework.util.ReflectionUtils
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests for KotlinReflectionParameterNameDiscoverer
|
* Tests for [KotlinReflectionParameterNameDiscoverer].
|
||||||
*/
|
*/
|
||||||
class KotlinReflectionParameterNameDiscovererTests {
|
class KotlinReflectionParameterNameDiscovererTests {
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2019 the original author or authors.
|
* Copyright 2002-2023 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -32,16 +32,16 @@ import kotlin.reflect.jvm.javaMethod
|
||||||
* @author Juergen Hoeller
|
* @author Juergen Hoeller
|
||||||
* @author Konrad Kaminski
|
* @author Konrad Kaminski
|
||||||
*/
|
*/
|
||||||
class KotlinMethodParameterTests {
|
class MethodParameterKotlinTests {
|
||||||
|
|
||||||
private val nullableMethod: Method = javaClass.getMethod("nullable", String::class.java)
|
private val nullableMethod: Method = javaClass.getMethod("nullable", String::class.java)
|
||||||
|
|
||||||
private val nonNullableMethod = javaClass.getMethod("nonNullable", String::class.java)
|
private val nonNullableMethod = javaClass.getMethod("nonNullable", String::class.java)
|
||||||
|
|
||||||
private val innerClassConstructor = InnerClass::class.java.getConstructor(KotlinMethodParameterTests::class.java)
|
private val innerClassConstructor = InnerClass::class.java.getConstructor(MethodParameterKotlinTests::class.java)
|
||||||
|
|
||||||
private val innerClassWithParametersConstructor = InnerClassWithParameter::class.java
|
private val innerClassWithParametersConstructor = InnerClassWithParameter::class.java
|
||||||
.getConstructor(KotlinMethodParameterTests::class.java, String::class.java, String::class.java)
|
.getConstructor(MethodParameterKotlinTests::class.java, String::class.java, String::class.java)
|
||||||
|
|
||||||
private val regularClassConstructor = RegularClass::class.java.getConstructor(String::class.java, String::class.java)
|
private val regularClassConstructor = RegularClass::class.java.getConstructor(String::class.java, String::class.java)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2019 the original author or authors.
|
* Copyright 2002-2023 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -33,8 +33,13 @@ import reactor.test.StepVerifier
|
||||||
import java.time.Duration
|
import java.time.Duration
|
||||||
import kotlin.reflect.KClass
|
import kotlin.reflect.KClass
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Kotlin tests for [ReactiveAdapterRegistry].
|
||||||
|
*
|
||||||
|
* @author Sebastien Deleuze
|
||||||
|
*/
|
||||||
@OptIn(DelicateCoroutinesApi::class)
|
@OptIn(DelicateCoroutinesApi::class)
|
||||||
class KotlinReactiveAdapterRegistryTests {
|
class ReactiveAdapterRegistryKotlinTests {
|
||||||
|
|
||||||
private val registry = ReactiveAdapterRegistry.getSharedInstance()
|
private val registry = ReactiveAdapterRegistry.getSharedInstance()
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2020 the original author or authors.
|
* Copyright 2002-2023 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -28,7 +28,7 @@ import org.junit.jupiter.api.Test
|
||||||
* @author Sebastien Deleuze
|
* @author Sebastien Deleuze
|
||||||
*/
|
*/
|
||||||
@Disabled
|
@Disabled
|
||||||
class KotlinPropertyResolverExtensionsTests {
|
class PropertyResolverExtensionsKotlinTests {
|
||||||
|
|
||||||
val propertyResolver = mockk<PropertyResolver>()
|
val propertyResolver = mockk<PropertyResolver>()
|
||||||
|
|
|
@ -26,8 +26,8 @@ import org.springframework.core.io.support.SpringFactoriesLoader.ArgumentResolve
|
||||||
*
|
*
|
||||||
* @author Phillip Webb
|
* @author Phillip Webb
|
||||||
*/
|
*/
|
||||||
@Suppress("unused", "UNUSED_PARAMETER", "PLATFORM_CLASS_MAPPED_TO_KOTLIN")
|
@Suppress("unused", "PLATFORM_CLASS_MAPPED_TO_KOTLIN")
|
||||||
class KotlinSpringFactoriesLoaderTests {
|
class SpringFactoriesLoaderKotlinTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun `Instantiate immutable data class`() {
|
fun `Instantiate immutable data class`() {
|
|
@ -22,7 +22,7 @@ import org.springframework.expression.ExpressionParser
|
||||||
import org.springframework.expression.spel.standard.SpelExpressionParser
|
import org.springframework.expression.spel.standard.SpelExpressionParser
|
||||||
import kotlin.coroutines.Continuation
|
import kotlin.coroutines.Continuation
|
||||||
|
|
||||||
class KotlinSpelReproTests {
|
class SpelReproKotlinTests {
|
||||||
|
|
||||||
private val parser: ExpressionParser = SpelExpressionParser()
|
private val parser: ExpressionParser = SpelExpressionParser()
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ class KotlinSpelReproTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun `gh-23812 SpEL cannot invoke Kotlin synthetic classes`() {
|
fun `gh-23812 SpEL cannot invoke Kotlin synthetic classes`() {
|
||||||
val expr = parser.parseExpression("new org.springframework.expression.spel.KotlinSpelReproTests\$Config().kotlinSupplier().invoke()")
|
val expr = parser.parseExpression("new org.springframework.expression.spel.SpelReproKotlinTests\$Config().kotlinSupplier().invoke()")
|
||||||
assertThat(expr.getValue(context)).isEqualTo("test")
|
assertThat(expr.getValue(context)).isEqualTo("test")
|
||||||
}
|
}
|
||||||
|
|
|
@ -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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -22,7 +22,7 @@ import org.springframework.jdbc.core.test.ConstructorPerson
|
||||||
import java.math.BigDecimal
|
import java.math.BigDecimal
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
class KotlinDataClassRowMapperTests : AbstractRowMapperTests() {
|
class DataClassRowMapperKotlinTests : AbstractRowMapperTests() {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun testStaticQueryWithDataClass() {
|
fun testStaticQueryWithDataClass() {
|
|
@ -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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -25,7 +25,6 @@ import org.springframework.messaging.support.MessageBuilder
|
||||||
import java.nio.charset.StandardCharsets
|
import java.nio.charset.StandardCharsets
|
||||||
import kotlin.reflect.typeOf
|
import kotlin.reflect.typeOf
|
||||||
|
|
||||||
@Suppress("UsePropertyAccessSyntax")
|
|
||||||
class KotlinSerializationJsonMessageConverterTests {
|
class KotlinSerializationJsonMessageConverterTests {
|
||||||
|
|
||||||
private val converter = KotlinSerializationJsonMessageConverter()
|
private val converter = KotlinSerializationJsonMessageConverter()
|
||||||
|
|
|
@ -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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -32,7 +32,7 @@ import org.springframework.test.context.junit.jupiter.SpringJUnitConfig
|
||||||
* @author Sam Brannen
|
* @author Sam Brannen
|
||||||
*/
|
*/
|
||||||
@SpringJUnitConfig
|
@SpringJUnitConfig
|
||||||
class KotlinDynamicPropertySourceIntegrationTests {
|
class DynamicPropertySourceKotlinIntegrationTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun hasInjectedValues(@Autowired service: Service) {
|
fun hasInjectedValues(@Autowired service: Service) {
|
|
@ -24,7 +24,7 @@ import org.junit.jupiter.api.Test
|
||||||
*
|
*
|
||||||
* @author Sebastien Deleuze
|
* @author Sebastien Deleuze
|
||||||
*/
|
*/
|
||||||
class KotlinResponseEntityTests {
|
class ResponseEntityKotlinTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun ofNullable() {
|
fun ofNullable() {
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2021 the original author or authors.
|
* Copyright 2002-2023 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -40,7 +40,6 @@ import org.springframework.http.codec.ServerSentEvent
|
||||||
* @author Sebastien Deleuze
|
* @author Sebastien Deleuze
|
||||||
* @author Iain Henderson
|
* @author Iain Henderson
|
||||||
*/
|
*/
|
||||||
@Suppress("UsePropertyAccessSyntax")
|
|
||||||
@ExperimentalSerializationApi
|
@ExperimentalSerializationApi
|
||||||
class KotlinSerializationCborEncoderTests : AbstractEncoderTests<KotlinSerializationCborEncoder>(KotlinSerializationCborEncoder()) {
|
class KotlinSerializationCborEncoderTests : AbstractEncoderTests<KotlinSerializationCborEncoder>(KotlinSerializationCborEncoder()) {
|
||||||
|
|
||||||
|
|
|
@ -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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -39,8 +39,8 @@ import reactor.test.StepVerifier.FirstStep
|
||||||
* @author Iain Henderson
|
* @author Iain Henderson
|
||||||
*/
|
*/
|
||||||
@ExperimentalSerializationApi
|
@ExperimentalSerializationApi
|
||||||
class KotlinSerializationCborDecoderTests : AbstractDecoderTests<KotlinSerializationProtobufDecoder>(KotlinSerializationProtobufDecoder()) {
|
class KotlinSerializationProtobufDecoderTests : AbstractDecoderTests<KotlinSerializationProtobufDecoder>(KotlinSerializationProtobufDecoder()) {
|
||||||
@Suppress("UsePropertyAccessSyntax")
|
|
||||||
@Test
|
@Test
|
||||||
override fun canDecode() {
|
override fun canDecode() {
|
||||||
for (mimeType in listOf(MediaType.APPLICATION_PROTOBUF, MediaType.APPLICATION_OCTET_STREAM, MediaType("application", "vnd.google.protobuf"))) {
|
for (mimeType in listOf(MediaType.APPLICATION_PROTOBUF, MediaType.APPLICATION_OCTET_STREAM, MediaType("application", "vnd.google.protobuf"))) {
|
||||||
|
|
|
@ -31,7 +31,7 @@ import org.springframework.web.service.annotation.GetExchange
|
||||||
*
|
*
|
||||||
* @author Sebastien Deleuze
|
* @author Sebastien Deleuze
|
||||||
*/
|
*/
|
||||||
class KotlinHttpServiceMethodTests {
|
class HttpServiceMethodKotlinTests {
|
||||||
|
|
||||||
private val client = TestHttpClientAdapter()
|
private val client = TestHttpClientAdapter()
|
||||||
private val proxyFactory = HttpServiceProxyFactory.builder(client).build()
|
private val proxyFactory = HttpServiceProxyFactory.builder(client).build()
|
|
@ -40,9 +40,8 @@ import java.util.function.Consumer
|
||||||
*
|
*
|
||||||
* @author DongHyeon Kim
|
* @author DongHyeon Kim
|
||||||
* @author Sebastien Deleuze
|
* @author Sebastien Deleuze
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
class KotlinWebClientHttpServiceProxyTests {
|
class WebClientHttpServiceProxyKotlinTests {
|
||||||
|
|
||||||
private lateinit var server: MockWebServer
|
private lateinit var server: MockWebServer
|
||||||
|
|
|
@ -37,7 +37,12 @@ import java.lang.reflect.Method
|
||||||
import java.time.Duration
|
import java.time.Duration
|
||||||
import kotlin.reflect.jvm.javaMethod
|
import kotlin.reflect.jvm.javaMethod
|
||||||
|
|
||||||
class KotlinInvocableHandlerMethodTests {
|
/**
|
||||||
|
* Kotlin unit tests for [InvocableHandlerMethod].
|
||||||
|
*
|
||||||
|
* @author Sebastien Deleuze
|
||||||
|
*/
|
||||||
|
class InvocableHandlerMethodKotlinTests {
|
||||||
|
|
||||||
private val exchange = MockServerWebExchange.from(get("http://localhost:8080/path"))
|
private val exchange = MockServerWebExchange.from(get("http://localhost:8080/path"))
|
||||||
|
|
|
@ -44,7 +44,7 @@ import java.util.*
|
||||||
*
|
*
|
||||||
* @author Sebastien Deleuze
|
* @author Sebastien Deleuze
|
||||||
*/
|
*/
|
||||||
class KotlinMessageWriterResultHandlerTests {
|
class MessageWriterResultHandlerKotlinTests {
|
||||||
|
|
||||||
private val resultHandler = initResultHandler()
|
private val resultHandler = initResultHandler()
|
||||||
|
|
Loading…
Reference in New Issue