Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove test modules #2874

Merged
merged 14 commits into from
Dec 28, 2022
5 changes: 4 additions & 1 deletion arrow-libs/core/arrow-continuations/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ kotlin {
if(!enableCompatibilityMetadataVariant) {
commonTest {
dependencies {
implementation(project(":arrow-core-test"))
implementation(projects.arrowCore)
implementation(libs.kotest.frameworkEngine)
implementation(libs.kotest.assertionsCore)
implementation(libs.kotest.property)
}
}
jvmTest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ import arrow.core.computations.ensureNotNull
import arrow.core.computations.eval
import arrow.core.left
import arrow.core.right
import arrow.core.test.UnitSpec
import io.kotest.assertions.fail
import io.kotest.core.spec.style.StringSpec
import io.kotest.matchers.shouldBe
import io.kotest.property.Arb
import io.kotest.property.arbitrary.boolean
import io.kotest.property.arbitrary.int
import io.kotest.property.arbitrary.orNull
import io.kotest.property.arbitrary.string
import io.kotest.property.checkAll
import kotlinx.coroutines.CompletableDeferred
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Deferred
Expand All @@ -31,7 +32,7 @@ import kotlin.coroutines.intrinsics.intercepted
import kotlin.coroutines.intrinsics.suspendCoroutineUninterceptedOrReturn
import kotlin.coroutines.startCoroutine

class SuspendingComputationTest : UnitSpec({
class SuspendingComputationTest : StringSpec({

"immediate values" {
either<String, Int> {
Expand Down
5 changes: 4 additions & 1 deletion arrow-libs/core/arrow-core-retrofit/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,12 @@ dependencies {
compileOnly(libs.squareup.retrofit)

if (!enableCompatibilityMetadataVariant) {
testImplementation(projects.arrowCore)
testImplementation(libs.kotest.frameworkEngine)
testImplementation(libs.kotest.assertionsCore)
testImplementation(libs.kotest.property)
testCompileOnly(libs.kotlin.reflect)
testRuntimeOnly(libs.kotest.runnerJUnit5)
testImplementation(project(":arrow-core-test"))
testImplementation(libs.squareup.okhttpMockWebServer)
testImplementation(libs.squareup.retrofitConverterGson)
testImplementation(libs.squareup.retrofitConverterMoshi)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,21 @@ package arrow.retrofit.adapter.either

import arrow.core.left
import arrow.core.right
import arrow.core.test.UnitSpec
import arrow.retrofit.adapter.mock.ErrorMock
import arrow.retrofit.adapter.mock.ResponseMock
import arrow.retrofit.adapter.retrofit.SuspendApiTestClient
import io.kotest.core.spec.style.StringSpec
import io.kotest.matchers.shouldBe
import okhttp3.mockwebserver.MockResponse
import okhttp3.mockwebserver.MockWebServer
import okhttp3.mockwebserver.SocketPolicy
import retrofit2.Retrofit
import retrofit2.converter.gson.GsonConverterFactory

class ArrowEitherCallAdapterTest : UnitSpec() {
class ArrowEitherCallAdapterTest : StringSpec({

private lateinit var server: MockWebServer
private lateinit var service: SuspendApiTestClient

init {
lateinit var server: MockWebServer
lateinit var service: SuspendApiTestClient

beforeAny {
server = MockWebServer()
Expand Down Expand Up @@ -88,5 +86,5 @@ class ArrowEitherCallAdapterTest : UnitSpec() {

body.isFailure shouldBe true
}
}
}

})
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,21 @@ package arrow.retrofit.adapter.either

import arrow.core.left
import arrow.core.right
import arrow.core.test.UnitSpec
import arrow.retrofit.adapter.mock.ErrorMock
import arrow.retrofit.adapter.mock.ResponseMock
import arrow.retrofit.adapter.retrofit.SuspendApiTestClient
import io.kotest.core.spec.style.StringSpec
import io.kotest.matchers.shouldBe
import okhttp3.mockwebserver.MockResponse
import okhttp3.mockwebserver.MockWebServer
import okhttp3.mockwebserver.SocketPolicy
import retrofit2.Retrofit
import retrofit2.converter.gson.GsonConverterFactory

class ArrowResponseEAdapterTest : UnitSpec() {
class ArrowResponseEAdapterTest : StringSpec({
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Finally StringSpec({ }) everywhere ❤️


private lateinit var server: MockWebServer
private lateinit var service: SuspendApiTestClient

init {
lateinit var server: MockWebServer
lateinit var service: SuspendApiTestClient

beforeAny {
server = MockWebServer()
Expand Down Expand Up @@ -100,5 +98,5 @@ class ArrowResponseEAdapterTest : UnitSpec() {

responseE.isFailure shouldBe true
}
}
}

})
158 changes: 0 additions & 158 deletions arrow-libs/core/arrow-core-test/api/arrow-core-test.api

This file was deleted.

37 changes: 0 additions & 37 deletions arrow-libs/core/arrow-core-test/build.gradle.kts

This file was deleted.

3 changes: 0 additions & 3 deletions arrow-libs/core/arrow-core-test/gradle.properties

This file was deleted.