Skip to content

Commit b2a86cc

Browse files
committed
1 parent f161bc7 commit b2a86cc

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

spring-core/src/test/kotlin/org/springframework/core/convert/support/DefaultConversionServiceKotlinTests.kt

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
* Copyright 2002-2023 the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
package org.springframework.core.convert.support
218

319
import org.assertj.core.api.Assertions.assertThat
@@ -20,9 +36,8 @@ class DefaultConversionServiceKotlinTests {
2036
@Test
2137
fun stringToRegex() {
2238
val pattern = "\\w+"
23-
assertThat(conversionService.convert(pattern, Regex::class.java)).isInstanceOfSatisfying(
24-
Regex::class.java
25-
) { regex -> assertThat(regex.pattern).isEqualTo(pattern) }
39+
assertThat(conversionService.convert(pattern, Regex::class.java))
40+
.isInstanceOfSatisfying(Regex::class.java) { assertThat(it.pattern).isEqualTo(pattern) }
2641
}
2742

2843
@Test

0 commit comments

Comments
 (0)