This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Junit5 Extension which sets up a light-server BeforeAll tests and tears it down AfterAll. | |
* Use with `@ExtendWith(LightTestServer::class)` | |
* | |
* The first time a server is started in a particular VM, a random port is assigned to it to avoid clashes between | |
* concurrent test runs or other active servers. | |
* | |
* There are also static utility methods to make requests to the configured server. | |
*/ | |
class LightTestServer() : BeforeAllCallback, AfterAllCallback { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.junit.jupiter.api.Assertions.assertEquals | |
import org.junit.jupiter.api.Test | |
import org.junit.jupiter.api.TestInstance | |
/** Test that tests run and that particular testing techniques work. */ | |
@TestInstance(TestInstance.Lifecycle.PER_CLASS) | |
class KtTestTest { | |
var state = "initial" |