diff --git a/README.adoc b/README.adoc index 392ba45..c6019dc 100644 --- a/README.adoc +++ b/README.adoc @@ -8,6 +8,8 @@ image:https://img.shields.io/badge/code%20style-%E2%9D%A4-FF4081.svg[ktlint,link image:https://img.shields.io/maven-central/v/com.koriit.kotlin/ktor-controllers.svg?label=Maven%20Central[Maven Central, link="https://search.maven.org/search?q=g:%22com.koriit.kotlin%22%20AND%20a:%22ktor-controllers%22"] image:https://img.shields.io/github/license/koriit/ktor-controllers[GitHub] +WARNING: From version 0.7.0 all package names have been renamed to match new artifact group id. + Helpers to create powerful Ktor controllers. [WARNING] diff --git a/src/main/kotlin/korrit/kotlin/ktor/controllers/Helpers.kt b/src/main/kotlin/com/korrit/kotlin/ktor/controllers/Helpers.kt similarity index 94% rename from src/main/kotlin/korrit/kotlin/ktor/controllers/Helpers.kt rename to src/main/kotlin/com/korrit/kotlin/ktor/controllers/Helpers.kt index 3b8b89d..5047ae2 100644 --- a/src/main/kotlin/korrit/kotlin/ktor/controllers/Helpers.kt +++ b/src/main/kotlin/com/korrit/kotlin/ktor/controllers/Helpers.kt @@ -1,4 +1,4 @@ -package korrit.kotlin.ktor.controllers +package com.korrit.kotlin.ktor.controllers import io.ktor.server.engine.ApplicationEngine import kotlinx.coroutines.channels.Channel diff --git a/src/main/kotlin/korrit/kotlin/ktor/controllers/Input.kt b/src/main/kotlin/com/korrit/kotlin/ktor/controllers/Input.kt similarity index 98% rename from src/main/kotlin/korrit/kotlin/ktor/controllers/Input.kt rename to src/main/kotlin/com/korrit/kotlin/ktor/controllers/Input.kt index 5370188..ee997a9 100644 --- a/src/main/kotlin/korrit/kotlin/ktor/controllers/Input.kt +++ b/src/main/kotlin/com/korrit/kotlin/ktor/controllers/Input.kt @@ -1,4 +1,4 @@ -package korrit.kotlin.ktor.controllers +package com.korrit.kotlin.ktor.controllers import io.ktor.application.ApplicationCall import io.ktor.application.call diff --git a/src/main/kotlin/korrit/kotlin/ktor/controllers/Params.kt b/src/main/kotlin/com/korrit/kotlin/ktor/controllers/Params.kt similarity index 91% rename from src/main/kotlin/korrit/kotlin/ktor/controllers/Params.kt rename to src/main/kotlin/com/korrit/kotlin/ktor/controllers/Params.kt index c9a8ffd..a28c807 100644 --- a/src/main/kotlin/korrit/kotlin/ktor/controllers/Params.kt +++ b/src/main/kotlin/com/korrit/kotlin/ktor/controllers/Params.kt @@ -1,10 +1,10 @@ @file:Suppress("MatchingDeclarationName") -package korrit.kotlin.ktor.controllers +package com.korrit.kotlin.ktor.controllers -import korrit.kotlin.ktor.controllers.delegates.HeaderParamDelegate -import korrit.kotlin.ktor.controllers.delegates.PathParamDelegate -import korrit.kotlin.ktor.controllers.delegates.QueryParamDelegate +import com.korrit.kotlin.ktor.controllers.delegates.HeaderParamDelegate +import com.korrit.kotlin.ktor.controllers.delegates.PathParamDelegate +import com.korrit.kotlin.ktor.controllers.delegates.QueryParamDelegate import kotlin.reflect.KProperty /** diff --git a/src/main/kotlin/korrit/kotlin/ktor/controllers/Responses.kt b/src/main/kotlin/com/korrit/kotlin/ktor/controllers/Responses.kt similarity index 98% rename from src/main/kotlin/korrit/kotlin/ktor/controllers/Responses.kt rename to src/main/kotlin/com/korrit/kotlin/ktor/controllers/Responses.kt index 4f3417d..1558d3d 100644 --- a/src/main/kotlin/korrit/kotlin/ktor/controllers/Responses.kt +++ b/src/main/kotlin/com/korrit/kotlin/ktor/controllers/Responses.kt @@ -1,4 +1,4 @@ -package korrit.kotlin.ktor.controllers +package com.korrit.kotlin.ktor.controllers import io.ktor.http.ContentType import io.ktor.http.HttpStatusCode diff --git a/src/main/kotlin/korrit/kotlin/ktor/controllers/Routing.kt b/src/main/kotlin/com/korrit/kotlin/ktor/controllers/Routing.kt similarity index 99% rename from src/main/kotlin/korrit/kotlin/ktor/controllers/Routing.kt rename to src/main/kotlin/com/korrit/kotlin/ktor/controllers/Routing.kt index 2120276..6a68c26 100644 --- a/src/main/kotlin/korrit/kotlin/ktor/controllers/Routing.kt +++ b/src/main/kotlin/com/korrit/kotlin/ktor/controllers/Routing.kt @@ -1,7 +1,7 @@ // intended to differentiate from core functions @file:Suppress("FunctionName") -package korrit.kotlin.ktor.controllers +package com.korrit.kotlin.ktor.controllers import io.ktor.routing.Route import io.ktor.routing.delete diff --git a/src/main/kotlin/korrit/kotlin/ktor/controllers/delegates/HeaderParamDelegate.kt b/src/main/kotlin/com/korrit/kotlin/ktor/controllers/delegates/HeaderParamDelegate.kt similarity index 93% rename from src/main/kotlin/korrit/kotlin/ktor/controllers/delegates/HeaderParamDelegate.kt rename to src/main/kotlin/com/korrit/kotlin/ktor/controllers/delegates/HeaderParamDelegate.kt index 3e42475..64daf46 100644 --- a/src/main/kotlin/korrit/kotlin/ktor/controllers/delegates/HeaderParamDelegate.kt +++ b/src/main/kotlin/com/korrit/kotlin/ktor/controllers/delegates/HeaderParamDelegate.kt @@ -1,8 +1,8 @@ -package korrit.kotlin.ktor.controllers.delegates +package com.korrit.kotlin.ktor.controllers.delegates +import com.korrit.kotlin.ktor.controllers.Input +import com.korrit.kotlin.ktor.controllers.exceptions.InputException import io.ktor.features.conversionService -import korrit.kotlin.ktor.controllers.Input -import korrit.kotlin.ktor.controllers.exceptions.InputException import java.lang.reflect.Type import kotlin.properties.ReadOnlyProperty import kotlin.reflect.KProperty diff --git a/src/main/kotlin/korrit/kotlin/ktor/controllers/delegates/PathParamDelegate.kt b/src/main/kotlin/com/korrit/kotlin/ktor/controllers/delegates/PathParamDelegate.kt similarity index 93% rename from src/main/kotlin/korrit/kotlin/ktor/controllers/delegates/PathParamDelegate.kt rename to src/main/kotlin/com/korrit/kotlin/ktor/controllers/delegates/PathParamDelegate.kt index 724c6b8..1e1588a 100644 --- a/src/main/kotlin/korrit/kotlin/ktor/controllers/delegates/PathParamDelegate.kt +++ b/src/main/kotlin/com/korrit/kotlin/ktor/controllers/delegates/PathParamDelegate.kt @@ -1,8 +1,8 @@ -package korrit.kotlin.ktor.controllers.delegates +package com.korrit.kotlin.ktor.controllers.delegates +import com.korrit.kotlin.ktor.controllers.Input +import com.korrit.kotlin.ktor.controllers.exceptions.InputException import io.ktor.features.conversionService -import korrit.kotlin.ktor.controllers.Input -import korrit.kotlin.ktor.controllers.exceptions.InputException import java.lang.reflect.Type import kotlin.properties.ReadOnlyProperty import kotlin.reflect.KProperty diff --git a/src/main/kotlin/korrit/kotlin/ktor/controllers/delegates/QueryParamDelegate.kt b/src/main/kotlin/com/korrit/kotlin/ktor/controllers/delegates/QueryParamDelegate.kt similarity index 93% rename from src/main/kotlin/korrit/kotlin/ktor/controllers/delegates/QueryParamDelegate.kt rename to src/main/kotlin/com/korrit/kotlin/ktor/controllers/delegates/QueryParamDelegate.kt index 96a5a78..46ed7ef 100644 --- a/src/main/kotlin/korrit/kotlin/ktor/controllers/delegates/QueryParamDelegate.kt +++ b/src/main/kotlin/com/korrit/kotlin/ktor/controllers/delegates/QueryParamDelegate.kt @@ -1,8 +1,8 @@ -package korrit.kotlin.ktor.controllers.delegates +package com.korrit.kotlin.ktor.controllers.delegates +import com.korrit.kotlin.ktor.controllers.Input +import com.korrit.kotlin.ktor.controllers.exceptions.InputException import io.ktor.features.conversionService -import korrit.kotlin.ktor.controllers.Input -import korrit.kotlin.ktor.controllers.exceptions.InputException import java.lang.reflect.Type import kotlin.properties.ReadOnlyProperty import kotlin.reflect.KProperty diff --git a/src/main/kotlin/korrit/kotlin/ktor/controllers/exceptions/InputException.kt b/src/main/kotlin/com/korrit/kotlin/ktor/controllers/exceptions/InputException.kt similarity index 78% rename from src/main/kotlin/korrit/kotlin/ktor/controllers/exceptions/InputException.kt rename to src/main/kotlin/com/korrit/kotlin/ktor/controllers/exceptions/InputException.kt index dece38b..48aa374 100644 --- a/src/main/kotlin/korrit/kotlin/ktor/controllers/exceptions/InputException.kt +++ b/src/main/kotlin/com/korrit/kotlin/ktor/controllers/exceptions/InputException.kt @@ -1,4 +1,4 @@ -package korrit.kotlin.ktor.controllers.exceptions +package com.korrit.kotlin.ktor.controllers.exceptions import io.ktor.features.BadRequestException diff --git a/src/main/kotlin/korrit/kotlin/ktor/controllers/patch/PatchDelegate.kt b/src/main/kotlin/com/korrit/kotlin/ktor/controllers/patch/PatchDelegate.kt similarity index 97% rename from src/main/kotlin/korrit/kotlin/ktor/controllers/patch/PatchDelegate.kt rename to src/main/kotlin/com/korrit/kotlin/ktor/controllers/patch/PatchDelegate.kt index 392ff54..5ba58ec 100644 --- a/src/main/kotlin/korrit/kotlin/ktor/controllers/patch/PatchDelegate.kt +++ b/src/main/kotlin/com/korrit/kotlin/ktor/controllers/patch/PatchDelegate.kt @@ -1,6 +1,6 @@ -package korrit.kotlin.ktor.controllers.patch +package com.korrit.kotlin.ktor.controllers.patch -import korrit.kotlin.ktor.controllers.exceptions.InputException +import com.korrit.kotlin.ktor.controllers.exceptions.InputException import kotlin.properties.ReadWriteProperty import kotlin.reflect.KMutableProperty1 import kotlin.reflect.KProperty diff --git a/src/main/kotlin/korrit/kotlin/ktor/controllers/patch/PatchOf.kt b/src/main/kotlin/com/korrit/kotlin/ktor/controllers/patch/PatchOf.kt similarity index 99% rename from src/main/kotlin/korrit/kotlin/ktor/controllers/patch/PatchOf.kt rename to src/main/kotlin/com/korrit/kotlin/ktor/controllers/patch/PatchOf.kt index 503b947..5422b7c 100644 --- a/src/main/kotlin/korrit/kotlin/ktor/controllers/patch/PatchOf.kt +++ b/src/main/kotlin/com/korrit/kotlin/ktor/controllers/patch/PatchOf.kt @@ -1,6 +1,6 @@ -package korrit.kotlin.ktor.controllers.patch +package com.korrit.kotlin.ktor.controllers.patch -import korrit.kotlin.ktor.controllers.exceptions.InputException +import com.korrit.kotlin.ktor.controllers.exceptions.InputException import java.util.concurrent.ConcurrentHashMap import kotlin.reflect.KClass import kotlin.reflect.KFunction diff --git a/src/main/kotlin/korrit/kotlin/ktor/features/UUIDCallId.kt b/src/main/kotlin/com/korrit/kotlin/ktor/features/UUIDCallId.kt similarity index 96% rename from src/main/kotlin/korrit/kotlin/ktor/features/UUIDCallId.kt rename to src/main/kotlin/com/korrit/kotlin/ktor/features/UUIDCallId.kt index e42b4b0..a224d0b 100644 --- a/src/main/kotlin/korrit/kotlin/ktor/features/UUIDCallId.kt +++ b/src/main/kotlin/com/korrit/kotlin/ktor/features/UUIDCallId.kt @@ -1,4 +1,4 @@ -package korrit.kotlin.ktor.features +package com.korrit.kotlin.ktor.features import io.ktor.application.ApplicationCallPipeline import io.ktor.application.ApplicationFeature diff --git a/src/test/kotlin/korrit/kotlin/ktor/controllers/ExampleTest.kt b/src/test/kotlin/com/korrit/kotlin/ktor/controllers/ExampleTest.kt similarity index 94% rename from src/test/kotlin/korrit/kotlin/ktor/controllers/ExampleTest.kt rename to src/test/kotlin/com/korrit/kotlin/ktor/controllers/ExampleTest.kt index 477c6db..f73f80b 100644 --- a/src/test/kotlin/korrit/kotlin/ktor/controllers/ExampleTest.kt +++ b/src/test/kotlin/com/korrit/kotlin/ktor/controllers/ExampleTest.kt @@ -1,12 +1,12 @@ -package korrit.kotlin.ktor.controllers +package com.korrit.kotlin.ktor.controllers +import com.korrit.kotlin.ktor.controllers.exceptions.InputException import io.ktor.http.ContentType.Text import io.ktor.http.HttpMethod.Companion.Get import io.ktor.http.HttpStatusCode.Companion.BadRequest import io.ktor.http.HttpStatusCode.Companion.OK import io.ktor.response.header import io.ktor.response.respondText -import korrit.kotlin.ktor.controllers.exceptions.InputException import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Test diff --git a/src/test/kotlin/korrit/kotlin/ktor/controllers/HelpersTest.kt b/src/test/kotlin/com/korrit/kotlin/ktor/controllers/HelpersTest.kt similarity index 87% rename from src/test/kotlin/korrit/kotlin/ktor/controllers/HelpersTest.kt rename to src/test/kotlin/com/korrit/kotlin/ktor/controllers/HelpersTest.kt index 304332c..a53570f 100644 --- a/src/test/kotlin/korrit/kotlin/ktor/controllers/HelpersTest.kt +++ b/src/test/kotlin/com/korrit/kotlin/ktor/controllers/HelpersTest.kt @@ -1,4 +1,4 @@ -package korrit.kotlin.ktor.controllers +package com.korrit.kotlin.ktor.controllers import io.ktor.server.cio.CIO import io.ktor.server.engine.embeddedServer diff --git a/src/test/kotlin/korrit/kotlin/ktor/controllers/InputTest.kt b/src/test/kotlin/com/korrit/kotlin/ktor/controllers/InputTest.kt similarity index 98% rename from src/test/kotlin/korrit/kotlin/ktor/controllers/InputTest.kt rename to src/test/kotlin/com/korrit/kotlin/ktor/controllers/InputTest.kt index 0c6514c..4715ba6 100644 --- a/src/test/kotlin/korrit/kotlin/ktor/controllers/InputTest.kt +++ b/src/test/kotlin/com/korrit/kotlin/ktor/controllers/InputTest.kt @@ -1,4 +1,4 @@ -package korrit.kotlin.ktor.controllers +package com.korrit.kotlin.ktor.controllers import io.ktor.http.ContentType.Application import io.ktor.http.HttpHeaders.ContentType diff --git a/src/test/kotlin/korrit/kotlin/ktor/controllers/TestHelpers.kt b/src/test/kotlin/com/korrit/kotlin/ktor/controllers/TestHelpers.kt similarity index 97% rename from src/test/kotlin/korrit/kotlin/ktor/controllers/TestHelpers.kt rename to src/test/kotlin/com/korrit/kotlin/ktor/controllers/TestHelpers.kt index d558f8c..91b956f 100644 --- a/src/test/kotlin/korrit/kotlin/ktor/controllers/TestHelpers.kt +++ b/src/test/kotlin/com/korrit/kotlin/ktor/controllers/TestHelpers.kt @@ -1,4 +1,4 @@ -package korrit.kotlin.ktor.controllers +package com.korrit.kotlin.ktor.controllers import com.koriit.kotlin.slf4j.logger import kotlinx.coroutines.TimeoutCancellationException diff --git a/src/test/kotlin/korrit/kotlin/ktor/controllers/TestServer.kt b/src/test/kotlin/com/korrit/kotlin/ktor/controllers/TestServer.kt similarity index 94% rename from src/test/kotlin/korrit/kotlin/ktor/controllers/TestServer.kt rename to src/test/kotlin/com/korrit/kotlin/ktor/controllers/TestServer.kt index 91f755d..3fff88b 100644 --- a/src/test/kotlin/korrit/kotlin/ktor/controllers/TestServer.kt +++ b/src/test/kotlin/com/korrit/kotlin/ktor/controllers/TestServer.kt @@ -1,4 +1,4 @@ -package korrit.kotlin.ktor.controllers +package com.korrit.kotlin.ktor.controllers import com.fasterxml.jackson.databind.DeserializationFeature import com.fasterxml.jackson.databind.SerializationFeature @@ -6,6 +6,7 @@ import com.fasterxml.jackson.databind.json.JsonMapper import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule import com.fasterxml.jackson.module.kotlin.KotlinModule import com.korrit.kotlin.ktor.convertTime +import com.korrit.kotlin.ktor.features.UUIDCallId import io.ktor.application.install import io.ktor.features.ContentNegotiation import io.ktor.features.DataConversion @@ -15,7 +16,6 @@ import io.ktor.routing.Routing import io.ktor.routing.routing import io.ktor.server.engine.applicationEngineEnvironment import io.ktor.server.testing.TestApplicationEngine -import korrit.kotlin.ktor.features.UUIDCallId fun testServer( controller: Routing.() -> Unit diff --git a/src/test/kotlin/korrit/kotlin/ktor/controllers/delegates/HeaderParamTest.kt b/src/test/kotlin/com/korrit/kotlin/ktor/controllers/delegates/HeaderParamTest.kt similarity index 94% rename from src/test/kotlin/korrit/kotlin/ktor/controllers/delegates/HeaderParamTest.kt rename to src/test/kotlin/com/korrit/kotlin/ktor/controllers/delegates/HeaderParamTest.kt index 760a83a..b132795 100644 --- a/src/test/kotlin/korrit/kotlin/ktor/controllers/delegates/HeaderParamTest.kt +++ b/src/test/kotlin/com/korrit/kotlin/ktor/controllers/delegates/HeaderParamTest.kt @@ -1,14 +1,14 @@ -package korrit.kotlin.ktor.controllers.delegates +package com.korrit.kotlin.ktor.controllers.delegates +import com.korrit.kotlin.ktor.controllers.Ctx +import com.korrit.kotlin.ktor.controllers.EmptyBodyInput +import com.korrit.kotlin.ktor.controllers.GET +import com.korrit.kotlin.ktor.controllers.header +import com.korrit.kotlin.ktor.controllers.testServer import io.ktor.http.HttpMethod.Companion.Get import io.ktor.http.HttpStatusCode.Companion.BadRequest import io.ktor.http.HttpStatusCode.Companion.OK import io.ktor.response.respond -import korrit.kotlin.ktor.controllers.Ctx -import korrit.kotlin.ktor.controllers.EmptyBodyInput -import korrit.kotlin.ktor.controllers.GET -import korrit.kotlin.ktor.controllers.header -import korrit.kotlin.ktor.controllers.testServer import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Test import org.junit.jupiter.api.fail diff --git a/src/test/kotlin/korrit/kotlin/ktor/controllers/delegates/PathParamTest.kt b/src/test/kotlin/com/korrit/kotlin/ktor/controllers/delegates/PathParamTest.kt similarity index 94% rename from src/test/kotlin/korrit/kotlin/ktor/controllers/delegates/PathParamTest.kt rename to src/test/kotlin/com/korrit/kotlin/ktor/controllers/delegates/PathParamTest.kt index 835012c..ba9611c 100644 --- a/src/test/kotlin/korrit/kotlin/ktor/controllers/delegates/PathParamTest.kt +++ b/src/test/kotlin/com/korrit/kotlin/ktor/controllers/delegates/PathParamTest.kt @@ -1,14 +1,14 @@ -package korrit.kotlin.ktor.controllers.delegates +package com.korrit.kotlin.ktor.controllers.delegates +import com.korrit.kotlin.ktor.controllers.Ctx +import com.korrit.kotlin.ktor.controllers.EmptyBodyInput +import com.korrit.kotlin.ktor.controllers.GET +import com.korrit.kotlin.ktor.controllers.path +import com.korrit.kotlin.ktor.controllers.testServer import io.ktor.http.HttpMethod.Companion.Get import io.ktor.http.HttpStatusCode.Companion.BadRequest import io.ktor.http.HttpStatusCode.Companion.OK import io.ktor.response.respond -import korrit.kotlin.ktor.controllers.Ctx -import korrit.kotlin.ktor.controllers.EmptyBodyInput -import korrit.kotlin.ktor.controllers.GET -import korrit.kotlin.ktor.controllers.path -import korrit.kotlin.ktor.controllers.testServer import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Test import org.junit.jupiter.api.fail diff --git a/src/test/kotlin/korrit/kotlin/ktor/controllers/delegates/QueryParamTest.kt b/src/test/kotlin/com/korrit/kotlin/ktor/controllers/delegates/QueryParamTest.kt similarity index 93% rename from src/test/kotlin/korrit/kotlin/ktor/controllers/delegates/QueryParamTest.kt rename to src/test/kotlin/com/korrit/kotlin/ktor/controllers/delegates/QueryParamTest.kt index e8c5d6e..15e2853 100644 --- a/src/test/kotlin/korrit/kotlin/ktor/controllers/delegates/QueryParamTest.kt +++ b/src/test/kotlin/com/korrit/kotlin/ktor/controllers/delegates/QueryParamTest.kt @@ -1,15 +1,15 @@ -package korrit.kotlin.ktor.controllers.delegates - +package com.korrit.kotlin.ktor.controllers.delegates + +import com.korrit.kotlin.ktor.controllers.Ctx +import com.korrit.kotlin.ktor.controllers.EmptyBodyInput +import com.korrit.kotlin.ktor.controllers.GET +import com.korrit.kotlin.ktor.controllers.path +import com.korrit.kotlin.ktor.controllers.query +import com.korrit.kotlin.ktor.controllers.testServer import io.ktor.http.HttpMethod.Companion.Get import io.ktor.http.HttpStatusCode.Companion.BadRequest import io.ktor.http.HttpStatusCode.Companion.OK import io.ktor.response.respond -import korrit.kotlin.ktor.controllers.Ctx -import korrit.kotlin.ktor.controllers.EmptyBodyInput -import korrit.kotlin.ktor.controllers.GET -import korrit.kotlin.ktor.controllers.path -import korrit.kotlin.ktor.controllers.query -import korrit.kotlin.ktor.controllers.testServer import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Test import org.junit.jupiter.api.fail diff --git a/src/test/kotlin/korrit/kotlin/ktor/controllers/features/UUIDCallIdTest.kt b/src/test/kotlin/com/korrit/kotlin/ktor/controllers/features/UUIDCallIdTest.kt similarity index 86% rename from src/test/kotlin/korrit/kotlin/ktor/controllers/features/UUIDCallIdTest.kt rename to src/test/kotlin/com/korrit/kotlin/ktor/controllers/features/UUIDCallIdTest.kt index e60e407..5a968af 100644 --- a/src/test/kotlin/korrit/kotlin/ktor/controllers/features/UUIDCallIdTest.kt +++ b/src/test/kotlin/com/korrit/kotlin/ktor/controllers/features/UUIDCallIdTest.kt @@ -1,15 +1,15 @@ -package korrit.kotlin.ktor.controllers.features - +package com.korrit.kotlin.ktor.controllers.features + +import com.korrit.kotlin.ktor.controllers.Ctx +import com.korrit.kotlin.ktor.controllers.EmptyBodyInput +import com.korrit.kotlin.ktor.controllers.GET +import com.korrit.kotlin.ktor.controllers.header +import com.korrit.kotlin.ktor.controllers.testServer +import com.korrit.kotlin.ktor.features.UUIDCallId import io.ktor.features.callId import io.ktor.http.HttpMethod.Companion.Get import io.ktor.http.HttpStatusCode.Companion.OK import io.ktor.response.respond -import korrit.kotlin.ktor.controllers.Ctx -import korrit.kotlin.ktor.controllers.EmptyBodyInput -import korrit.kotlin.ktor.controllers.GET -import korrit.kotlin.ktor.controllers.header -import korrit.kotlin.ktor.controllers.testServer -import korrit.kotlin.ktor.features.UUIDCallId import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Assertions.assertNotEquals import org.junit.jupiter.api.Test diff --git a/src/test/kotlin/korrit/kotlin/ktor/controllers/patch/PatchOfTest.kt b/src/test/kotlin/com/korrit/kotlin/ktor/controllers/patch/PatchOfTest.kt similarity index 97% rename from src/test/kotlin/korrit/kotlin/ktor/controllers/patch/PatchOfTest.kt rename to src/test/kotlin/com/korrit/kotlin/ktor/controllers/patch/PatchOfTest.kt index b1aece5..e012796 100644 --- a/src/test/kotlin/korrit/kotlin/ktor/controllers/patch/PatchOfTest.kt +++ b/src/test/kotlin/com/korrit/kotlin/ktor/controllers/patch/PatchOfTest.kt @@ -1,9 +1,16 @@ -package korrit.kotlin.ktor.controllers.patch +package com.korrit.kotlin.ktor.controllers.patch import com.fasterxml.jackson.databind.ObjectMapper import com.fasterxml.jackson.module.kotlin.readValue import com.fasterxml.jackson.module.kotlin.registerKotlinModule import com.koriit.kotlin.slf4j.logger +import com.korrit.kotlin.ktor.controllers.Ctx +import com.korrit.kotlin.ktor.controllers.Input +import com.korrit.kotlin.ktor.controllers.PATCH +import com.korrit.kotlin.ktor.controllers.PUT +import com.korrit.kotlin.ktor.controllers.exceptions.InputException +import com.korrit.kotlin.ktor.controllers.testCases +import com.korrit.kotlin.ktor.controllers.testServer import io.ktor.client.utils.EmptyContent import io.ktor.http.ContentType.Application import io.ktor.http.HttpHeaders.ContentType @@ -13,13 +20,6 @@ import io.ktor.http.HttpStatusCode.Companion.NoContent import io.ktor.request.httpMethod import io.ktor.response.respond import io.ktor.server.testing.setBody -import korrit.kotlin.ktor.controllers.Ctx -import korrit.kotlin.ktor.controllers.Input -import korrit.kotlin.ktor.controllers.PATCH -import korrit.kotlin.ktor.controllers.PUT -import korrit.kotlin.ktor.controllers.exceptions.InputException -import korrit.kotlin.ktor.controllers.testCases -import korrit.kotlin.ktor.controllers.testServer import org.junit.jupiter.api.Assertions.assertDoesNotThrow import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Assertions.assertNull diff --git a/src/test/kotlin/korrit/kotlin/ktor/controllers/validation/HeaderParamTest.kt b/src/test/kotlin/com/korrit/kotlin/ktor/controllers/validation/HeaderParamTest.kt similarity index 94% rename from src/test/kotlin/korrit/kotlin/ktor/controllers/validation/HeaderParamTest.kt rename to src/test/kotlin/com/korrit/kotlin/ktor/controllers/validation/HeaderParamTest.kt index 437172a..3c0eeef 100644 --- a/src/test/kotlin/korrit/kotlin/ktor/controllers/validation/HeaderParamTest.kt +++ b/src/test/kotlin/com/korrit/kotlin/ktor/controllers/validation/HeaderParamTest.kt @@ -1,14 +1,14 @@ -package korrit.kotlin.ktor.controllers.validation +package com.korrit.kotlin.ktor.controllers.validation +import com.korrit.kotlin.ktor.controllers.Ctx +import com.korrit.kotlin.ktor.controllers.EmptyBodyInput +import com.korrit.kotlin.ktor.controllers.GET +import com.korrit.kotlin.ktor.controllers.header +import com.korrit.kotlin.ktor.controllers.testServer import io.ktor.http.HttpMethod.Companion.Get import io.ktor.http.HttpStatusCode.Companion.BadRequest import io.ktor.http.HttpStatusCode.Companion.OK import io.ktor.response.respond -import korrit.kotlin.ktor.controllers.Ctx -import korrit.kotlin.ktor.controllers.EmptyBodyInput -import korrit.kotlin.ktor.controllers.GET -import korrit.kotlin.ktor.controllers.header -import korrit.kotlin.ktor.controllers.testServer import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Test import org.junit.jupiter.api.fail