Skip to content

Commit

Permalink
Update Kotlin Test Usage
Browse files Browse the repository at this point in the history
Issue gh-13539
  • Loading branch information
jzheaux committed Jul 15, 2023
1 parent a08036a commit cf79af2
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,13 @@ class AuthorizeHttpRequestsDslTests {
@RestController
internal class PathController {
@RequestMapping("/path")
fun path() {
fun path(): String {
return "ok"
}

@RequestMapping("/onlyPostPermitted")
fun onlyPostPermitted() {
fun onlyPostPermitted():String {
return "ok"
}
}
}
Expand Down Expand Up @@ -274,7 +276,8 @@ class AuthorizeHttpRequestsDslTests {
@RestController
internal class PathController {
@GetMapping("/")
fun index() {
fun index(): String {
return "ok"
}
}

Expand Down Expand Up @@ -340,7 +343,8 @@ class AuthorizeHttpRequestsDslTests {
@RestController
internal class PathController {
@GetMapping("/")
fun index() {
fun index(): String {
return "ok"
}
}

Expand Down Expand Up @@ -405,7 +409,8 @@ class AuthorizeHttpRequestsDslTests {
@RestController
internal class PathController {
@GetMapping("/")
fun index() {
fun index(): String {
return "ok"
}
}

Expand Down Expand Up @@ -471,7 +476,8 @@ class AuthorizeHttpRequestsDslTests {
@RestController
internal class PathController {
@GetMapping("/")
fun index() {
fun index(): String {
return "ok"
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,13 @@ class AuthorizeRequestsDslTests {
@RestController
internal class PathController {
@RequestMapping("/path")
fun path() {
fun path(): String {
return "ok"
}

@RequestMapping("/onlyPostPermitted")
fun onlyPostPermitted() {
fun onlyPostPermitted(): String {
return "ok"
}
}
}
Expand Down Expand Up @@ -171,7 +173,8 @@ class AuthorizeRequestsDslTests {
@RestController
internal class PathController {
@RequestMapping("/path")
fun path() {
fun path(): String {
return "ok"
}
}
}
Expand Down Expand Up @@ -327,7 +330,8 @@ class AuthorizeRequestsDslTests {
@RestController
internal class PathController {
@GetMapping("/")
fun index() {
fun index():String {
return "ok"
}
}

Expand Down Expand Up @@ -398,7 +402,8 @@ class AuthorizeRequestsDslTests {
@RestController
internal class PathController {
@GetMapping("/")
fun index() {
fun index():String {
return "ok"
}
}

Expand Down Expand Up @@ -461,7 +466,8 @@ class AuthorizeRequestsDslTests {
@RestController
internal class PathController {
@RequestMapping("/path")
fun path() {
fun path():String {
return "ok"
}
}
}
Expand All @@ -484,7 +490,8 @@ class AuthorizeRequestsDslTests {
@RestController
internal class PathController {
@RequestMapping("/path")
fun path() {
fun path(): String {
return "ok"
}
}
}
Expand Down Expand Up @@ -522,7 +529,8 @@ class AuthorizeRequestsDslTests {
@RestController
internal class PathController {
@RequestMapping("/path")
fun path() {
fun path(): String {
return "ok"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,11 +290,13 @@ class CsrfDslTests {
@RestController
internal class BasicController {
@PostMapping("/test1")
fun test1() {
fun test1():String {
return "ok"
}

@PostMapping("/test2")
fun test2() {
fun test2():String {
return "ok"
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,8 @@ class HttpBasicDslTests {
@RestController
class MainController {
@GetMapping("/")
fun main() {
fun main():String {
return "ok"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,9 @@ class OAuth2LoginDslTests {
@RestController
class LoginController {
@GetMapping("/custom-login")
fun loginPage() { }
fun loginPage():String {
return "ok"
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,8 @@ private static Object asFlow(Publisher<?> publisher) {
return ReactiveFlowKt.asFlow(publisher);
}

private static Object awaitSingleOrNull(Publisher<?> publisher, Object continuation) {
return MonoKt.awaitSingleOrNull(publisher, (Continuation<?>) continuation);
private static Object awaitSingleOrNull(Mono<?> publisher, Object continuation) {
return MonoKt.awaitSingleOrNull(publisher, (Continuation<Object>) continuation);
}

}
Expand Down

0 comments on commit cf79af2

Please sign in to comment.