<Kotlin nested classes and functions optimization>...
# stackoverflow
u
Kotlin nested classes and functions optimization I´ve spent quite some time trying to learn about nested classes, functions and companion objects in Kotlin. I wanted to build a helper for my integration tests that posts a request to the authorization server and receives a token which I'll use in the tests in order to test the controllers. My idea was calling among these lines: withUser().authenticate() //returns an access token withAdmin().authenticate() authenticate().withUser() authenticate().withAdmin() And so on, you get the idea....