Skip to content

Commit

Permalink
Merge pull request #665 from hexagonkt/develop
Browse files Browse the repository at this point in the history
Refactor tests
  • Loading branch information
jaguililla authored Sep 25, 2023
2 parents 984d8af + 135cf08 commit 4b0dcd0
Show file tree
Hide file tree
Showing 127 changed files with 144 additions and 727 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ jobs:
ref: develop
- uses: graalvm/setup-graalvm@v1
with:
java-version: 21
distribution: graalvm-community
cache: gradle
- run: ./gradlew --stacktrace nativeTest

Expand Down
2 changes: 1 addition & 1 deletion core/src/test/kotlin/com/hexagonkt/core/AnsiTest.kt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.hexagonkt.core

import com.hexagonkt.core.logging.Logger
import kotlin.test.Test
import org.junit.jupiter.api.Test

internal class AnsiTest {

Expand Down
2 changes: 1 addition & 1 deletion core/src/test/kotlin/com/hexagonkt/core/CasesTest.kt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.hexagonkt.core

import com.hexagonkt.core.CasesTest.Size.X_L
import kotlin.test.Test
import org.junit.jupiter.api.Test
import kotlin.test.*

internal class CasesTest {
Expand Down
2 changes: 1 addition & 1 deletion core/src/test/kotlin/com/hexagonkt/core/ChecksTest.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.hexagonkt.core

import kotlin.test.Test
import org.junit.jupiter.api.Test
import kotlin.IllegalArgumentException
import java.time.LocalDate
import kotlin.test.assertEquals
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package com.hexagonkt.core
import com.hexagonkt.core.logging.LoggingLevel
import com.hexagonkt.core.logging.LoggingManager
import org.junit.jupiter.api.BeforeAll
import kotlin.test.Test
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.TestInstance
import org.junit.jupiter.api.TestInstance.Lifecycle.PER_CLASS
import java.net.MalformedURLException
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.hexagonkt.core

import kotlin.test.Test
import org.junit.jupiter.api.Test

internal class CodedExceptionTest {

Expand Down
1 change: 1 addition & 0 deletions core/src/test/kotlin/com/hexagonkt/core/DataTest.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.hexagonkt.core

import org.junit.jupiter.api.Test
import kotlin.test.*

internal class DataTest {
Expand Down
2 changes: 1 addition & 1 deletion core/src/test/kotlin/com/hexagonkt/core/DatesTest.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.hexagonkt.core

import kotlin.test.Test
import org.junit.jupiter.api.Test
import java.time.*
import java.time.Month.*
import java.util.Calendar
Expand Down
2 changes: 1 addition & 1 deletion core/src/test/kotlin/com/hexagonkt/core/ExceptionsTest.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.hexagonkt.core

import kotlin.test.Test
import org.junit.jupiter.api.Test
import kotlin.test.*

internal class ExceptionsTest {
Expand Down
2 changes: 1 addition & 1 deletion core/src/test/kotlin/com/hexagonkt/core/GlobTest.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.hexagonkt.core

import kotlin.test.Test
import org.junit.jupiter.api.Test
import kotlin.IllegalArgumentException
import java.util.regex.PatternSyntaxException
import kotlin.test.assertEquals
Expand Down
2 changes: 1 addition & 1 deletion core/src/test/kotlin/com/hexagonkt/core/HelpersTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package com.hexagonkt.core

import org.junit.jupiter.api.condition.DisabledOnOs
import org.junit.jupiter.api.condition.OS.WINDOWS
import kotlin.test.Test
import org.junit.jupiter.api.Test
import kotlin.test.*

internal class HelpersTest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import com.hexagonkt.core.logging.logger
import com.hexagonkt.core.logging.Logger
import com.hexagonkt.core.logging.LoggingLevel.*
import com.hexagonkt.core.logging.LoggingManager
import kotlin.test.Test
import org.junit.jupiter.api.Test
import kotlin.test.assertContains

internal class HexagonCoreSamplesTest {
Expand Down
2 changes: 1 addition & 1 deletion core/src/test/kotlin/com/hexagonkt/core/I18nTest.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.hexagonkt.core

import kotlin.test.Test
import org.junit.jupiter.api.Test
import java.util.Currency.getAvailableCurrencies
import java.util.Locale.getISOCountries
import java.util.Locale.getISOLanguages
Expand Down
2 changes: 1 addition & 1 deletion core/src/test/kotlin/com/hexagonkt/core/JvmTest.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.hexagonkt.core

import kotlin.test.Test
import org.junit.jupiter.api.Test
import kotlin.IllegalArgumentException
import java.net.Inet4Address
import java.net.URI
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.hexagonkt.core

import org.junit.jupiter.api.condition.DisabledInNativeImage
import kotlin.test.Test
import org.junit.jupiter.api.Test
import kotlin.test.assertEquals

internal class MapResourceBundleTest {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.hexagonkt.core

import kotlin.test.Test
import org.junit.jupiter.api.Test
import kotlin.test.assertContentEquals
import kotlin.test.assertEquals

Expand Down
2 changes: 1 addition & 1 deletion core/src/test/kotlin/com/hexagonkt/core/NetworkTest.kt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.hexagonkt.core

import java.net.ServerSocket
import kotlin.test.Test
import org.junit.jupiter.api.Test
import java.net.InetAddress
import java.util.*
import kotlin.test.*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.hexagonkt.core

import kotlin.test.Test
import org.junit.jupiter.api.Test

internal class StringsSamplesTest {

Expand Down
2 changes: 1 addition & 1 deletion core/src/test/kotlin/com/hexagonkt/core/StringsTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import java.net.URL
import java.time.LocalDate
import java.time.LocalDateTime
import java.time.LocalTime
import kotlin.test.Test
import org.junit.jupiter.api.Test
import kotlin.test.*
import kotlin.text.prependIndent
import com.hexagonkt.core.StringsTest.Size.S
Expand Down
2 changes: 1 addition & 1 deletion core/src/test/kotlin/com/hexagonkt/core/UuidsTest.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.hexagonkt.core

import kotlin.test.Test
import org.junit.jupiter.api.Test
import java.util.UUID

internal class UuidsTest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import com.hexagonkt.core.logging.LoggingLevel.*
import io.mockk.every
import io.mockk.mockk
import org.junit.jupiter.api.condition.DisabledInNativeImage
import org.junit.jupiter.api.Test
import kotlin.IllegalStateException
import kotlin.reflect.KClass
import kotlin.test.*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import io.mockk.mockk
import org.junit.jupiter.api.condition.DisabledInNativeImage
import kotlin.IllegalStateException
import kotlin.reflect.KClass
import kotlin.test.Test
import org.junit.jupiter.api.Test
import kotlin.test.assertEquals
import kotlin.test.assertFailsWith
import kotlin.test.assertFalse
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.hexagonkt.core.logging

import com.hexagonkt.core.logging.LoggingLevel.*
import kotlin.test.Test
import org.junit.jupiter.api.Test
import java.time.LocalDate
import kotlin.test.assertEquals
import kotlin.test.assertFalse
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.hexagonkt.core.media

import com.hexagonkt.core.media.MediaTypeGroup.*
import kotlin.test.Test
import org.junit.jupiter.api.Test
import kotlin.IllegalArgumentException
import kotlin.test.assertEquals
import kotlin.test.assertFailsWith
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package com.hexagonkt.core.media

import com.hexagonkt.core.media.MediaTypeGroup.*
import com.hexagonkt.core.urlOf
import kotlin.test.Test
import org.junit.jupiter.api.Test
import java.io.File
import java.net.URI
import kotlin.IllegalArgumentException
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.hexagonkt.core.security

import kotlin.test.Test
import org.junit.jupiter.api.Test

import java.time.LocalDateTime
import java.time.format.DateTimeFormatter
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.hexagonkt.core.security

import com.hexagonkt.core.urlOf
import kotlin.test.Test
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.condition.DisabledOnOs
import org.junit.jupiter.api.condition.OS.WINDOWS
import java.io.File
Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ org.gradle.warning.mode=all
org.gradle.console=plain

# Gradle
version=3.2.0
version=3.2.1
group=com.hexagonkt
description=The atoms of your platform

Expand Down Expand Up @@ -33,11 +33,11 @@ iconsDirectory=content
# VERSIONS
kotlinVersion=1.9.10
dokkaVersion=1.9.0
mockkVersion=1.13.7
mockkVersion=1.13.8
junitVersion=5.10.0
gatlingVersion=3.9.5
jmhVersion=1.37
mkdocsMaterialVersion=9.3.2
mkdocsMaterialVersion=9.4.2
mermaidDokkaVersion=0.4.4
nativeToolsVersion=0.9.27

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package com.hexagonkt.handlers

import kotlin.IllegalStateException
import kotlin.system.measureNanoTime
import kotlin.test.Test
import org.junit.jupiter.api.Test
import kotlin.test.assertEquals
import kotlin.test.assertIs
import kotlin.test.assertTrue
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.hexagonkt.handlers

import kotlin.test.Test
import org.junit.jupiter.api.Test
import kotlin.test.assertEquals
import kotlin.test.assertIs
import kotlin.test.assertTrue
Expand Down
2 changes: 1 addition & 1 deletion http/http/src/test/kotlin/com/hexagonkt/http/HttpTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import com.hexagonkt.http.model.Header
import com.hexagonkt.http.model.QueryParameters
import com.hexagonkt.http.model.Headers
import com.hexagonkt.http.model.QueryParameter
import kotlin.test.Test
import org.junit.jupiter.api.Test
import java.math.BigInteger
import java.time.*
import kotlin.test.assertContentEquals
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.hexagonkt.http

import kotlin.test.Test
import org.junit.jupiter.api.Test
import kotlin.test.assertEquals
import kotlin.test.assertFalse
import kotlin.test.assertNull
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package com.hexagonkt.http.model

import com.hexagonkt.core.media.TEXT_PLAIN
import com.hexagonkt.http.parseContentType
import kotlin.test.Test
import org.junit.jupiter.api.Test
import kotlin.IllegalStateException
import java.nio.charset.Charset
import java.nio.charset.UnsupportedCharsetException
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.hexagonkt.http.model

import org.junit.jupiter.api.Assertions.assertFalse
import kotlin.test.Test
import org.junit.jupiter.api.Test
import kotlin.IllegalArgumentException
import kotlin.test.assertEquals
import kotlin.test.assertFailsWith
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.hexagonkt.http.model

import com.hexagonkt.core.require
import kotlin.test.Test
import org.junit.jupiter.api.Test
import kotlin.test.*

internal class FormParametersTest {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.hexagonkt.http.model

import com.hexagonkt.core.require
import kotlin.test.Test
import org.junit.jupiter.api.Test
import kotlin.test.*

internal class HeadersTest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import com.hexagonkt.core.media.TEXT_HTML
import com.hexagonkt.core.media.TEXT_PLAIN
import com.hexagonkt.http.model.HttpMethod.*
import com.hexagonkt.http.model.HttpProtocol.HTTPS
import kotlin.test.Test
import org.junit.jupiter.api.Test
import kotlin.test.assertEquals
import kotlin.test.assertFalse

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.hexagonkt.http.model

import kotlin.test.Test
import org.junit.jupiter.api.Test
import kotlin.test.assertEquals

internal class HttpFieldTest {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.hexagonkt.http.model

import kotlin.test.Test
import org.junit.jupiter.api.Test
import kotlin.test.assertEquals

internal class HttpMethodTest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package com.hexagonkt.http.model
import com.hexagonkt.core.media.MediaTypeGroup.TEXT
import com.hexagonkt.core.media.MediaType
import com.hexagonkt.core.media.TEXT_HTML
import kotlin.test.Test
import org.junit.jupiter.api.Test
import kotlin.test.assertEquals
import kotlin.test.assertFalse
import kotlin.test.assertNotEquals
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.hexagonkt.http.model

import com.hexagonkt.http.model.HttpProtocol.*
import kotlin.test.Test
import org.junit.jupiter.api.Test
import kotlin.test.assertEquals

internal class HttpProtocolTest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import com.hexagonkt.http.model.HttpMethod.POST
import com.hexagonkt.http.model.HttpMethod.PUT
import com.hexagonkt.http.model.HttpProtocol.*
import java.security.cert.X509Certificate
import org.junit.jupiter.api.Test
import kotlin.test.*

internal class HttpRequestTest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package com.hexagonkt.http.model

import com.hexagonkt.core.media.TEXT_HTML
import com.hexagonkt.core.media.TEXT_RICHTEXT
import kotlin.test.Test
import org.junit.jupiter.api.Test
import kotlin.test.assertEquals
import kotlin.test.assertFalse
import kotlin.test.assertNotEquals
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.hexagonkt.http.model

import com.hexagonkt.http.model.HttpStatusType.*
import kotlin.test.Test
import org.junit.jupiter.api.Test
import kotlin.IllegalArgumentException
import kotlin.test.assertEquals
import kotlin.test.assertFailsWith
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.hexagonkt.http.model

import com.hexagonkt.http.model.HttpStatusType.*
import kotlin.test.Test
import org.junit.jupiter.api.Test
import kotlin.test.assertEquals

internal class HttpStatusesTest {
Expand Down
Loading

0 comments on commit 4b0dcd0

Please sign in to comment.