diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 4208b5cb..1b77f506 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.6.0"
+ ".": "0.7.0"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index 85a351b6..fb126643 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 44
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sent%2Fsent-dm-433bfd8c688a6b6d2d4f964bb59121d692798f4e2bb6cb47f6110c4f0e1f638d.yml
-openapi_spec_hash: 5378295d401c8c1152c1946cc7dbd69f
-config_hash: 43a0daa5b05d44a1620e3da0ea6f4fdc
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sent%2Fsent-dm-8f8e43f2568f02505d53d422fb814604dd9534de6f990f9ae460e5513613da68.yml
+openapi_spec_hash: b7a6855c6f0a9892f450f0bc67031d4e
+config_hash: d475a61f5b59375bf562f85f19b80409
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a6efd531..2c76af5c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,21 @@
# Changelog
+## 0.7.0 (2026-02-24)
+
+Full Changelog: [v0.6.0...v0.7.0](https://github.com/sentdm/sent-dm-java/compare/v0.6.0...v0.7.0)
+
+### Features
+
+* **client:** add connection pooling option ([7d04245](https://github.com/sentdm/sent-dm-java/commit/7d04245815d1ad0a7690adf6f53ae98e574bc56c))
+
+
+### Chores
+
+* configure new SDK language ([668fa3e](https://github.com/sentdm/sent-dm-java/commit/668fa3ea4e37e9a6d4b27768069f6e8745c4702c))
+* **internal:** make `OkHttp` constructor internal ([6389eb0](https://github.com/sentdm/sent-dm-java/commit/6389eb0a1cebb8e7291af86de87578f426601c14))
+* **internal:** remove mock server code ([d81a366](https://github.com/sentdm/sent-dm-java/commit/d81a3667dd4f8d761f6f4e5ff90dc2fcb3882a1c))
+* update mock server docs ([e1413d2](https://github.com/sentdm/sent-dm-java/commit/e1413d2932000755edf64a0422f5cd99a9f82544))
+
## 0.6.0 (2026-02-18)
Full Changelog: [v0.5.1...v0.6.0](https://github.com/sentdm/sent-dm-java/compare/v0.5.1...v0.6.0)
diff --git a/README.md b/README.md
index 1f286c1a..3183430f 100644
--- a/README.md
+++ b/README.md
@@ -2,8 +2,8 @@
-[](https://central.sonatype.com/artifact/dm.sent/sent-dm-java/0.6.0)
-[](https://javadoc.io/doc/dm.sent/sent-dm-java/0.6.0)
+[](https://central.sonatype.com/artifact/dm.sent/sent-dm-java/0.7.0)
+[](https://javadoc.io/doc/dm.sent/sent-dm-java/0.7.0)
@@ -11,9 +11,18 @@ The Sent Dm Java SDK provides convenient access to the [Sent Dm REST API](https:
It is generated with [Stainless](https://www.stainless.com/).
+## MCP Server
+
+Use the Sent Dm MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.
+
+[](https://cursor.com/en-US/install-mcp?name=%40sentdm%2Fsentdm-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBzZW50ZG0vc2VudGRtLW1jcCJdLCJlbnYiOnsiU0VOVF9ETV9BUElfS0VZIjoiTXkgQVBJIEtleSJ9fQ)
+[](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40sentdm%2Fsentdm-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40sentdm%2Fsentdm-mcp%22%5D%2C%22env%22%3A%7B%22SENT_DM_API_KEY%22%3A%22My%20API%20Key%22%7D%7D)
+
+> Note: You may need to set environment variables in your MCP client.
+
-The REST API documentation can be found on [docs.sent.dm](https://docs.sent.dm). Javadocs are available on [javadoc.io](https://javadoc.io/doc/dm.sent/sent-dm-java/0.6.0).
+The REST API documentation can be found on [docs.sent.dm](https://docs.sent.dm). Javadocs are available on [javadoc.io](https://javadoc.io/doc/dm.sent/sent-dm-java/0.7.0).
@@ -24,7 +33,7 @@ The REST API documentation can be found on [docs.sent.dm](https://docs.sent.dm).
### Gradle
```kotlin
-implementation("dm.sent:sent-dm-java:0.6.0")
+implementation("dm.sent:sent-dm-java:0.7.0")
```
### Maven
@@ -33,7 +42,7 @@ implementation("dm.sent:sent-dm-java:0.6.0")
dm.sent
sent-dm-java
- 0.6.0
+ 0.7.0
```
@@ -391,6 +400,25 @@ SentDmClient client = SentDmOkHttpClient.builder()
.build();
```
+### Connection pooling
+
+To customize the underlying OkHttp connection pool, configure the client using the `maxIdleConnections` and `keepAliveDuration` methods:
+
+```java
+import dm.sent.client.SentDmClient;
+import dm.sent.client.okhttp.SentDmOkHttpClient;
+import java.time.Duration;
+
+SentDmClient client = SentDmOkHttpClient.builder()
+ .fromEnv()
+ // If `maxIdleConnections` is set, then `keepAliveDuration` must be set, and vice versa.
+ .maxIdleConnections(10)
+ .keepAliveDuration(Duration.ofMinutes(2))
+ .build();
+```
+
+If both options are unset, OkHttp's default connection pool settings are used.
+
### HTTPS
> [!NOTE]
diff --git a/build.gradle.kts b/build.gradle.kts
index 061efe6b..21b13773 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -8,7 +8,7 @@ repositories {
allprojects {
group = "dm.sent"
- version = "0.6.0" // x-release-please-version
+ version = "0.7.0" // x-release-please-version
}
subprojects {
diff --git a/scripts/mock b/scripts/mock
deleted file mode 100755
index 0b28f6ea..00000000
--- a/scripts/mock
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/usr/bin/env bash
-
-set -e
-
-cd "$(dirname "$0")/.."
-
-if [[ -n "$1" && "$1" != '--'* ]]; then
- URL="$1"
- shift
-else
- URL="$(grep 'openapi_spec_url' .stats.yml | cut -d' ' -f2)"
-fi
-
-# Check if the URL is empty
-if [ -z "$URL" ]; then
- echo "Error: No OpenAPI spec path/url provided or found in .stats.yml"
- exit 1
-fi
-
-echo "==> Starting mock server with URL ${URL}"
-
-# Run prism mock on the given spec
-if [ "$1" == "--daemon" ]; then
- npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" &> .prism.log &
-
- # Wait for server to come online
- echo -n "Waiting for server"
- while ! grep -q "✖ fatal\|Prism is listening" ".prism.log" ; do
- echo -n "."
- sleep 0.1
- done
-
- if grep -q "✖ fatal" ".prism.log"; then
- cat .prism.log
- exit 1
- fi
-
- echo
-else
- npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL"
-fi
diff --git a/scripts/test b/scripts/test
index 047bc1db..904aea60 100755
--- a/scripts/test
+++ b/scripts/test
@@ -4,53 +4,7 @@ set -e
cd "$(dirname "$0")/.."
-RED='\033[0;31m'
-GREEN='\033[0;32m'
-YELLOW='\033[0;33m'
-NC='\033[0m' # No Color
-function prism_is_running() {
- curl --silent "http://localhost:4010" >/dev/null 2>&1
-}
-
-kill_server_on_port() {
- pids=$(lsof -t -i tcp:"$1" || echo "")
- if [ "$pids" != "" ]; then
- kill "$pids"
- echo "Stopped $pids."
- fi
-}
-
-function is_overriding_api_base_url() {
- [ -n "$TEST_API_BASE_URL" ]
-}
-
-if ! is_overriding_api_base_url && ! prism_is_running ; then
- # When we exit this script, make sure to kill the background mock server process
- trap 'kill_server_on_port 4010' EXIT
-
- # Start the dev server
- ./scripts/mock --daemon
-fi
-
-if is_overriding_api_base_url ; then
- echo -e "${GREEN}✔ Running tests against ${TEST_API_BASE_URL}${NC}"
- echo
-elif ! prism_is_running ; then
- echo -e "${RED}ERROR:${NC} The test suite will not run without a mock Prism server"
- echo -e "running against your OpenAPI spec."
- echo
- echo -e "To run the server, pass in the path or url of your OpenAPI"
- echo -e "spec to the prism command:"
- echo
- echo -e " \$ ${YELLOW}npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock path/to/your.openapi.yml${NC}"
- echo
-
- exit 1
-else
- echo -e "${GREEN}✔ Mock prism server is running with your OpenAPI spec${NC}"
- echo
-fi
echo "==> Running tests"
./gradlew test "$@"
diff --git a/sent-dm-java-client-okhttp/src/main/kotlin/dm/sent/client/okhttp/OkHttpClient.kt b/sent-dm-java-client-okhttp/src/main/kotlin/dm/sent/client/okhttp/OkHttpClient.kt
index d82584f0..273334a6 100644
--- a/sent-dm-java-client-okhttp/src/main/kotlin/dm/sent/client/okhttp/OkHttpClient.kt
+++ b/sent-dm-java-client-okhttp/src/main/kotlin/dm/sent/client/okhttp/OkHttpClient.kt
@@ -16,11 +16,13 @@ import java.time.Duration
import java.util.concurrent.CancellationException
import java.util.concurrent.CompletableFuture
import java.util.concurrent.ExecutorService
+import java.util.concurrent.TimeUnit
import javax.net.ssl.HostnameVerifier
import javax.net.ssl.SSLSocketFactory
import javax.net.ssl.X509TrustManager
import okhttp3.Call
import okhttp3.Callback
+import okhttp3.ConnectionPool
import okhttp3.Dispatcher
import okhttp3.HttpUrl.Companion.toHttpUrl
import okhttp3.MediaType
@@ -33,7 +35,7 @@ import okhttp3.logging.HttpLoggingInterceptor
import okio.BufferedSink
class OkHttpClient
-private constructor(@JvmSynthetic internal val okHttpClient: okhttp3.OkHttpClient) : HttpClient {
+internal constructor(@JvmSynthetic internal val okHttpClient: okhttp3.OkHttpClient) : HttpClient {
override fun execute(request: HttpRequest, requestOptions: RequestOptions): HttpResponse {
val call = newCall(request, requestOptions)
@@ -200,6 +202,8 @@ private constructor(@JvmSynthetic internal val okHttpClient: okhttp3.OkHttpClien
private var timeout: Timeout = Timeout.default()
private var proxy: Proxy? = null
+ private var maxIdleConnections: Int? = null
+ private var keepAliveDuration: Duration? = null
private var dispatcherExecutorService: ExecutorService? = null
private var sslSocketFactory: SSLSocketFactory? = null
private var trustManager: X509TrustManager? = null
@@ -211,6 +215,28 @@ private constructor(@JvmSynthetic internal val okHttpClient: okhttp3.OkHttpClien
fun proxy(proxy: Proxy?) = apply { this.proxy = proxy }
+ /**
+ * Sets the maximum number of idle connections kept by the underlying [ConnectionPool].
+ *
+ * If this is set, then [keepAliveDuration] must also be set.
+ *
+ * If unset, then OkHttp's default is used.
+ */
+ fun maxIdleConnections(maxIdleConnections: Int?) = apply {
+ this.maxIdleConnections = maxIdleConnections
+ }
+
+ /**
+ * Sets the keep-alive duration for idle connections in the underlying [ConnectionPool].
+ *
+ * If this is set, then [maxIdleConnections] must also be set.
+ *
+ * If unset, then OkHttp's default is used.
+ */
+ fun keepAliveDuration(keepAliveDuration: Duration?) = apply {
+ this.keepAliveDuration = keepAliveDuration
+ }
+
fun dispatcherExecutorService(dispatcherExecutorService: ExecutorService?) = apply {
this.dispatcherExecutorService = dispatcherExecutorService
}
@@ -240,6 +266,22 @@ private constructor(@JvmSynthetic internal val okHttpClient: okhttp3.OkHttpClien
.apply {
dispatcherExecutorService?.let { dispatcher(Dispatcher(it)) }
+ val maxIdleConnections = maxIdleConnections
+ val keepAliveDuration = keepAliveDuration
+ if (maxIdleConnections != null && keepAliveDuration != null) {
+ connectionPool(
+ ConnectionPool(
+ maxIdleConnections,
+ keepAliveDuration.toNanos(),
+ TimeUnit.NANOSECONDS,
+ )
+ )
+ } else {
+ check((maxIdleConnections != null) == (keepAliveDuration != null)) {
+ "Both or none of `maxIdleConnections` and `keepAliveDuration` must be set, but only one was set"
+ }
+ }
+
val sslSocketFactory = sslSocketFactory
val trustManager = trustManager
if (sslSocketFactory != null && trustManager != null) {
diff --git a/sent-dm-java-client-okhttp/src/main/kotlin/dm/sent/client/okhttp/SentDmOkHttpClient.kt b/sent-dm-java-client-okhttp/src/main/kotlin/dm/sent/client/okhttp/SentDmOkHttpClient.kt
index c863f2e0..f7acb5fb 100644
--- a/sent-dm-java-client-okhttp/src/main/kotlin/dm/sent/client/okhttp/SentDmOkHttpClient.kt
+++ b/sent-dm-java-client-okhttp/src/main/kotlin/dm/sent/client/okhttp/SentDmOkHttpClient.kt
@@ -47,6 +47,8 @@ class SentDmOkHttpClient private constructor() {
private var clientOptions: ClientOptions.Builder = ClientOptions.builder()
private var dispatcherExecutorService: ExecutorService? = null
private var proxy: Proxy? = null
+ private var maxIdleConnections: Int? = null
+ private var keepAliveDuration: Duration? = null
private var sslSocketFactory: SSLSocketFactory? = null
private var trustManager: X509TrustManager? = null
private var hostnameVerifier: HostnameVerifier? = null
@@ -75,6 +77,46 @@ class SentDmOkHttpClient private constructor() {
/** Alias for calling [Builder.proxy] with `proxy.orElse(null)`. */
fun proxy(proxy: Optional) = proxy(proxy.getOrNull())
+ /**
+ * The maximum number of idle connections kept by the underlying OkHttp connection pool.
+ *
+ * If this is set, then [keepAliveDuration] must also be set.
+ *
+ * If unset, then OkHttp's default is used.
+ */
+ fun maxIdleConnections(maxIdleConnections: Int?) = apply {
+ this.maxIdleConnections = maxIdleConnections
+ }
+
+ /**
+ * Alias for [Builder.maxIdleConnections].
+ *
+ * This unboxed primitive overload exists for backwards compatibility.
+ */
+ fun maxIdleConnections(maxIdleConnections: Int) =
+ maxIdleConnections(maxIdleConnections as Int?)
+
+ /**
+ * Alias for calling [Builder.maxIdleConnections] with `maxIdleConnections.orElse(null)`.
+ */
+ fun maxIdleConnections(maxIdleConnections: Optional) =
+ maxIdleConnections(maxIdleConnections.getOrNull())
+
+ /**
+ * The keep-alive duration for idle connections in the underlying OkHttp connection pool.
+ *
+ * If this is set, then [maxIdleConnections] must also be set.
+ *
+ * If unset, then OkHttp's default is used.
+ */
+ fun keepAliveDuration(keepAliveDuration: Duration?) = apply {
+ this.keepAliveDuration = keepAliveDuration
+ }
+
+ /** Alias for calling [Builder.keepAliveDuration] with `keepAliveDuration.orElse(null)`. */
+ fun keepAliveDuration(keepAliveDuration: Optional) =
+ keepAliveDuration(keepAliveDuration.getOrNull())
+
/**
* The socket factory used to secure HTTPS connections.
*
@@ -321,6 +363,8 @@ class SentDmOkHttpClient private constructor() {
OkHttpClient.builder()
.timeout(clientOptions.timeout())
.proxy(proxy)
+ .maxIdleConnections(maxIdleConnections)
+ .keepAliveDuration(keepAliveDuration)
.dispatcherExecutorService(dispatcherExecutorService)
.sslSocketFactory(sslSocketFactory)
.trustManager(trustManager)
diff --git a/sent-dm-java-client-okhttp/src/main/kotlin/dm/sent/client/okhttp/SentDmOkHttpClientAsync.kt b/sent-dm-java-client-okhttp/src/main/kotlin/dm/sent/client/okhttp/SentDmOkHttpClientAsync.kt
index b6b13078..f19121f3 100644
--- a/sent-dm-java-client-okhttp/src/main/kotlin/dm/sent/client/okhttp/SentDmOkHttpClientAsync.kt
+++ b/sent-dm-java-client-okhttp/src/main/kotlin/dm/sent/client/okhttp/SentDmOkHttpClientAsync.kt
@@ -47,6 +47,8 @@ class SentDmOkHttpClientAsync private constructor() {
private var clientOptions: ClientOptions.Builder = ClientOptions.builder()
private var dispatcherExecutorService: ExecutorService? = null
private var proxy: Proxy? = null
+ private var maxIdleConnections: Int? = null
+ private var keepAliveDuration: Duration? = null
private var sslSocketFactory: SSLSocketFactory? = null
private var trustManager: X509TrustManager? = null
private var hostnameVerifier: HostnameVerifier? = null
@@ -75,6 +77,46 @@ class SentDmOkHttpClientAsync private constructor() {
/** Alias for calling [Builder.proxy] with `proxy.orElse(null)`. */
fun proxy(proxy: Optional) = proxy(proxy.getOrNull())
+ /**
+ * The maximum number of idle connections kept by the underlying OkHttp connection pool.
+ *
+ * If this is set, then [keepAliveDuration] must also be set.
+ *
+ * If unset, then OkHttp's default is used.
+ */
+ fun maxIdleConnections(maxIdleConnections: Int?) = apply {
+ this.maxIdleConnections = maxIdleConnections
+ }
+
+ /**
+ * Alias for [Builder.maxIdleConnections].
+ *
+ * This unboxed primitive overload exists for backwards compatibility.
+ */
+ fun maxIdleConnections(maxIdleConnections: Int) =
+ maxIdleConnections(maxIdleConnections as Int?)
+
+ /**
+ * Alias for calling [Builder.maxIdleConnections] with `maxIdleConnections.orElse(null)`.
+ */
+ fun maxIdleConnections(maxIdleConnections: Optional) =
+ maxIdleConnections(maxIdleConnections.getOrNull())
+
+ /**
+ * The keep-alive duration for idle connections in the underlying OkHttp connection pool.
+ *
+ * If this is set, then [maxIdleConnections] must also be set.
+ *
+ * If unset, then OkHttp's default is used.
+ */
+ fun keepAliveDuration(keepAliveDuration: Duration?) = apply {
+ this.keepAliveDuration = keepAliveDuration
+ }
+
+ /** Alias for calling [Builder.keepAliveDuration] with `keepAliveDuration.orElse(null)`. */
+ fun keepAliveDuration(keepAliveDuration: Optional) =
+ keepAliveDuration(keepAliveDuration.getOrNull())
+
/**
* The socket factory used to secure HTTPS connections.
*
@@ -321,6 +363,8 @@ class SentDmOkHttpClientAsync private constructor() {
OkHttpClient.builder()
.timeout(clientOptions.timeout())
.proxy(proxy)
+ .maxIdleConnections(maxIdleConnections)
+ .keepAliveDuration(keepAliveDuration)
.dispatcherExecutorService(dispatcherExecutorService)
.sslSocketFactory(sslSocketFactory)
.trustManager(trustManager)
diff --git a/sent-dm-java-core/src/test/kotlin/dm/sent/TestServerExtension.kt b/sent-dm-java-core/src/test/kotlin/dm/sent/TestServerExtension.kt
deleted file mode 100644
index 07df7758..00000000
--- a/sent-dm-java-core/src/test/kotlin/dm/sent/TestServerExtension.kt
+++ /dev/null
@@ -1,49 +0,0 @@
-package dm.sent
-
-import java.lang.RuntimeException
-import java.net.URL
-import org.junit.jupiter.api.extension.BeforeAllCallback
-import org.junit.jupiter.api.extension.ConditionEvaluationResult
-import org.junit.jupiter.api.extension.ExecutionCondition
-import org.junit.jupiter.api.extension.ExtensionContext
-
-class TestServerExtension : BeforeAllCallback, ExecutionCondition {
-
- override fun beforeAll(context: ExtensionContext?) {
- try {
- URL(BASE_URL).openConnection().connect()
- } catch (e: Exception) {
- throw RuntimeException(
- """
- The test suite will not run without a mock server running against your OpenAPI spec.
-
- You can set the environment variable `SKIP_MOCK_TESTS` to `true` to skip running any tests
- that require the mock server.
-
- To fix run `./scripts/mock` in a separate terminal.
- """
- .trimIndent(),
- e,
- )
- }
- }
-
- override fun evaluateExecutionCondition(context: ExtensionContext): ConditionEvaluationResult {
- return if (System.getenv(SKIP_TESTS_ENV).toBoolean()) {
- ConditionEvaluationResult.disabled(
- "Environment variable $SKIP_TESTS_ENV is set to true"
- )
- } else {
- ConditionEvaluationResult.enabled(
- "Environment variable $SKIP_TESTS_ENV is not set to true"
- )
- }
- }
-
- companion object {
-
- val BASE_URL = System.getenv("TEST_API_BASE_URL") ?: "http://localhost:4010"
-
- const val SKIP_TESTS_ENV: String = "SKIP_MOCK_TESTS"
- }
-}
diff --git a/sent-dm-java-core/src/test/kotlin/dm/sent/services/ServiceParamsTest.kt b/sent-dm-java-core/src/test/kotlin/dm/sent/services/ServiceParamsTest.kt
index 2e90390b..43e5ecad 100644
--- a/sent-dm-java-core/src/test/kotlin/dm/sent/services/ServiceParamsTest.kt
+++ b/sent-dm-java-core/src/test/kotlin/dm/sent/services/ServiceParamsTest.kt
@@ -36,7 +36,7 @@ internal class ServiceParamsTest {
.build()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun send() {
val messageService = client.messages()
diff --git a/sent-dm-java-core/src/test/kotlin/dm/sent/services/async/BrandServiceAsyncTest.kt b/sent-dm-java-core/src/test/kotlin/dm/sent/services/async/BrandServiceAsyncTest.kt
index e7bf58a2..7508cb6b 100644
--- a/sent-dm-java-core/src/test/kotlin/dm/sent/services/async/BrandServiceAsyncTest.kt
+++ b/sent-dm-java-core/src/test/kotlin/dm/sent/services/async/BrandServiceAsyncTest.kt
@@ -2,7 +2,6 @@
package dm.sent.services.async
-import dm.sent.TestServerExtension
import dm.sent.client.okhttp.SentDmOkHttpClientAsync
import dm.sent.models.brands.BrandCreateParams
import dm.sent.models.brands.BrandData
@@ -13,19 +12,13 @@ import dm.sent.models.brands.TcrBrandRelationship
import dm.sent.models.brands.TcrVertical
import org.junit.jupiter.api.Disabled
import org.junit.jupiter.api.Test
-import org.junit.jupiter.api.extension.ExtendWith
-@ExtendWith(TestServerExtension::class)
internal class BrandServiceAsyncTest {
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun create() {
- val client =
- SentDmOkHttpClientAsync.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClientAsync.builder().apiKey("My API Key").build()
val brandServiceAsync = client.brands()
val apiResponseBrandWithKycFuture =
@@ -72,14 +65,10 @@ internal class BrandServiceAsyncTest {
apiResponseBrandWithKyc.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun update() {
- val client =
- SentDmOkHttpClientAsync.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClientAsync.builder().apiKey("My API Key").build()
val brandServiceAsync = client.brands()
val apiResponseBrandWithKycFuture =
@@ -127,14 +116,10 @@ internal class BrandServiceAsyncTest {
apiResponseBrandWithKyc.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun list() {
- val client =
- SentDmOkHttpClientAsync.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClientAsync.builder().apiKey("My API Key").build()
val brandServiceAsync = client.brands()
val brandsFuture = brandServiceAsync.list()
@@ -143,14 +128,10 @@ internal class BrandServiceAsyncTest {
brands.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun delete() {
- val client =
- SentDmOkHttpClientAsync.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClientAsync.builder().apiKey("My API Key").build()
val brandServiceAsync = client.brands()
val future =
diff --git a/sent-dm-java-core/src/test/kotlin/dm/sent/services/async/ContactServiceAsyncTest.kt b/sent-dm-java-core/src/test/kotlin/dm/sent/services/async/ContactServiceAsyncTest.kt
index 69f5a25a..3818f018 100644
--- a/sent-dm-java-core/src/test/kotlin/dm/sent/services/async/ContactServiceAsyncTest.kt
+++ b/sent-dm-java-core/src/test/kotlin/dm/sent/services/async/ContactServiceAsyncTest.kt
@@ -2,7 +2,6 @@
package dm.sent.services.async
-import dm.sent.TestServerExtension
import dm.sent.client.okhttp.SentDmOkHttpClientAsync
import dm.sent.models.contacts.ContactCreateParams
import dm.sent.models.contacts.ContactDeleteParams
@@ -10,19 +9,13 @@ import dm.sent.models.contacts.ContactListParams
import dm.sent.models.contacts.ContactUpdateParams
import org.junit.jupiter.api.Disabled
import org.junit.jupiter.api.Test
-import org.junit.jupiter.api.extension.ExtendWith
-@ExtendWith(TestServerExtension::class)
internal class ContactServiceAsyncTest {
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun create() {
- val client =
- SentDmOkHttpClientAsync.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClientAsync.builder().apiKey("My API Key").build()
val contactServiceAsync = client.contacts()
val apiResponseContactFuture =
@@ -38,14 +31,10 @@ internal class ContactServiceAsyncTest {
apiResponseContact.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun retrieve() {
- val client =
- SentDmOkHttpClientAsync.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClientAsync.builder().apiKey("My API Key").build()
val contactServiceAsync = client.contacts()
val apiResponseContactFuture =
@@ -55,14 +44,10 @@ internal class ContactServiceAsyncTest {
apiResponseContact.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun update() {
- val client =
- SentDmOkHttpClientAsync.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClientAsync.builder().apiKey("My API Key").build()
val contactServiceAsync = client.contacts()
val apiResponseContactFuture =
@@ -80,14 +65,10 @@ internal class ContactServiceAsyncTest {
apiResponseContact.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun list() {
- val client =
- SentDmOkHttpClientAsync.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClientAsync.builder().apiKey("My API Key").build()
val contactServiceAsync = client.contacts()
val contactsFuture =
@@ -105,14 +86,10 @@ internal class ContactServiceAsyncTest {
contacts.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun delete() {
- val client =
- SentDmOkHttpClientAsync.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClientAsync.builder().apiKey("My API Key").build()
val contactServiceAsync = client.contacts()
val future =
diff --git a/sent-dm-java-core/src/test/kotlin/dm/sent/services/async/LookupServiceAsyncTest.kt b/sent-dm-java-core/src/test/kotlin/dm/sent/services/async/LookupServiceAsyncTest.kt
index 67ced998..1f5f01bf 100644
--- a/sent-dm-java-core/src/test/kotlin/dm/sent/services/async/LookupServiceAsyncTest.kt
+++ b/sent-dm-java-core/src/test/kotlin/dm/sent/services/async/LookupServiceAsyncTest.kt
@@ -2,23 +2,16 @@
package dm.sent.services.async
-import dm.sent.TestServerExtension
import dm.sent.client.okhttp.SentDmOkHttpClientAsync
import org.junit.jupiter.api.Disabled
import org.junit.jupiter.api.Test
-import org.junit.jupiter.api.extension.ExtendWith
-@ExtendWith(TestServerExtension::class)
internal class LookupServiceAsyncTest {
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun retrievePhoneInfo() {
- val client =
- SentDmOkHttpClientAsync.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClientAsync.builder().apiKey("My API Key").build()
val lookupServiceAsync = client.lookup()
val responseFuture = lookupServiceAsync.retrievePhoneInfo("phoneNumber")
diff --git a/sent-dm-java-core/src/test/kotlin/dm/sent/services/async/MeServiceAsyncTest.kt b/sent-dm-java-core/src/test/kotlin/dm/sent/services/async/MeServiceAsyncTest.kt
index 4f2bc79c..7699059a 100644
--- a/sent-dm-java-core/src/test/kotlin/dm/sent/services/async/MeServiceAsyncTest.kt
+++ b/sent-dm-java-core/src/test/kotlin/dm/sent/services/async/MeServiceAsyncTest.kt
@@ -2,23 +2,16 @@
package dm.sent.services.async
-import dm.sent.TestServerExtension
import dm.sent.client.okhttp.SentDmOkHttpClientAsync
import org.junit.jupiter.api.Disabled
import org.junit.jupiter.api.Test
-import org.junit.jupiter.api.extension.ExtendWith
-@ExtendWith(TestServerExtension::class)
internal class MeServiceAsyncTest {
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun retrieve() {
- val client =
- SentDmOkHttpClientAsync.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClientAsync.builder().apiKey("My API Key").build()
val meServiceAsync = client.me()
val meFuture = meServiceAsync.retrieve()
diff --git a/sent-dm-java-core/src/test/kotlin/dm/sent/services/async/MessageServiceAsyncTest.kt b/sent-dm-java-core/src/test/kotlin/dm/sent/services/async/MessageServiceAsyncTest.kt
index 60302d29..1ad4690a 100644
--- a/sent-dm-java-core/src/test/kotlin/dm/sent/services/async/MessageServiceAsyncTest.kt
+++ b/sent-dm-java-core/src/test/kotlin/dm/sent/services/async/MessageServiceAsyncTest.kt
@@ -2,25 +2,18 @@
package dm.sent.services.async
-import dm.sent.TestServerExtension
import dm.sent.client.okhttp.SentDmOkHttpClientAsync
import dm.sent.core.JsonValue
import dm.sent.models.messages.MessageSendParams
import org.junit.jupiter.api.Disabled
import org.junit.jupiter.api.Test
-import org.junit.jupiter.api.extension.ExtendWith
-@ExtendWith(TestServerExtension::class)
internal class MessageServiceAsyncTest {
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun retrieveActivities() {
- val client =
- SentDmOkHttpClientAsync.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClientAsync.builder().apiKey("My API Key").build()
val messageServiceAsync = client.messages()
val responseFuture =
@@ -30,14 +23,10 @@ internal class MessageServiceAsyncTest {
response.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun retrieveStatus() {
- val client =
- SentDmOkHttpClientAsync.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClientAsync.builder().apiKey("My API Key").build()
val messageServiceAsync = client.messages()
val responseFuture =
@@ -47,14 +36,10 @@ internal class MessageServiceAsyncTest {
response.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun send() {
- val client =
- SentDmOkHttpClientAsync.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClientAsync.builder().apiKey("My API Key").build()
val messageServiceAsync = client.messages()
val responseFuture =
diff --git a/sent-dm-java-core/src/test/kotlin/dm/sent/services/async/ProfileServiceAsyncTest.kt b/sent-dm-java-core/src/test/kotlin/dm/sent/services/async/ProfileServiceAsyncTest.kt
index fea92527..97e96bc9 100644
--- a/sent-dm-java-core/src/test/kotlin/dm/sent/services/async/ProfileServiceAsyncTest.kt
+++ b/sent-dm-java-core/src/test/kotlin/dm/sent/services/async/ProfileServiceAsyncTest.kt
@@ -2,7 +2,6 @@
package dm.sent.services.async
-import dm.sent.TestServerExtension
import dm.sent.client.okhttp.SentDmOkHttpClientAsync
import dm.sent.models.profiles.ProfileCompleteParams
import dm.sent.models.profiles.ProfileCreateParams
@@ -10,19 +9,13 @@ import dm.sent.models.profiles.ProfileDeleteParams
import dm.sent.models.profiles.ProfileUpdateParams
import org.junit.jupiter.api.Disabled
import org.junit.jupiter.api.Test
-import org.junit.jupiter.api.extension.ExtendWith
-@ExtendWith(TestServerExtension::class)
internal class ProfileServiceAsyncTest {
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun create() {
- val client =
- SentDmOkHttpClientAsync.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClientAsync.builder().apiKey("My API Key").build()
val profileServiceAsync = client.profiles()
val apiResponseOfProfileDetailFuture =
@@ -48,14 +41,10 @@ internal class ProfileServiceAsyncTest {
apiResponseOfProfileDetail.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun retrieve() {
- val client =
- SentDmOkHttpClientAsync.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClientAsync.builder().apiKey("My API Key").build()
val profileServiceAsync = client.profiles()
val apiResponseOfProfileDetailFuture =
@@ -65,14 +54,10 @@ internal class ProfileServiceAsyncTest {
apiResponseOfProfileDetail.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun update() {
- val client =
- SentDmOkHttpClientAsync.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClientAsync.builder().apiKey("My API Key").build()
val profileServiceAsync = client.profiles()
val apiResponseOfProfileDetailFuture =
@@ -105,14 +90,10 @@ internal class ProfileServiceAsyncTest {
apiResponseOfProfileDetail.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun list() {
- val client =
- SentDmOkHttpClientAsync.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClientAsync.builder().apiKey("My API Key").build()
val profileServiceAsync = client.profiles()
val profilesFuture = profileServiceAsync.list()
@@ -121,14 +102,10 @@ internal class ProfileServiceAsyncTest {
profiles.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun delete() {
- val client =
- SentDmOkHttpClientAsync.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClientAsync.builder().apiKey("My API Key").build()
val profileServiceAsync = client.profiles()
val future =
@@ -143,14 +120,10 @@ internal class ProfileServiceAsyncTest {
val response = future.get()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun complete() {
- val client =
- SentDmOkHttpClientAsync.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClientAsync.builder().apiKey("My API Key").build()
val profileServiceAsync = client.profiles()
val responseFuture =
diff --git a/sent-dm-java-core/src/test/kotlin/dm/sent/services/async/TemplateServiceAsyncTest.kt b/sent-dm-java-core/src/test/kotlin/dm/sent/services/async/TemplateServiceAsyncTest.kt
index 95000d63..c26ded96 100644
--- a/sent-dm-java-core/src/test/kotlin/dm/sent/services/async/TemplateServiceAsyncTest.kt
+++ b/sent-dm-java-core/src/test/kotlin/dm/sent/services/async/TemplateServiceAsyncTest.kt
@@ -2,7 +2,6 @@
package dm.sent.services.async
-import dm.sent.TestServerExtension
import dm.sent.client.okhttp.SentDmOkHttpClientAsync
import dm.sent.models.templates.SentDmServicesCommonContractsPocOsAuthenticationConfig
import dm.sent.models.templates.SentDmServicesCommonContractsPocOsTemplateBody
@@ -19,19 +18,13 @@ import dm.sent.models.templates.TemplateUpdateParams
import dm.sent.models.templates.TemplateVariable
import org.junit.jupiter.api.Disabled
import org.junit.jupiter.api.Test
-import org.junit.jupiter.api.extension.ExtendWith
-@ExtendWith(TestServerExtension::class)
internal class TemplateServiceAsyncTest {
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun create() {
- val client =
- SentDmOkHttpClientAsync.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClientAsync.builder().apiKey("My API Key").build()
val templateServiceAsync = client.templates()
val apiResponseTemplateFuture =
@@ -222,14 +215,10 @@ internal class TemplateServiceAsyncTest {
apiResponseTemplate.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun retrieve() {
- val client =
- SentDmOkHttpClientAsync.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClientAsync.builder().apiKey("My API Key").build()
val templateServiceAsync = client.templates()
val apiResponseTemplateFuture =
@@ -239,14 +228,10 @@ internal class TemplateServiceAsyncTest {
apiResponseTemplate.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun update() {
- val client =
- SentDmOkHttpClientAsync.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClientAsync.builder().apiKey("My API Key").build()
val templateServiceAsync = client.templates()
val apiResponseTemplateFuture =
@@ -419,14 +404,10 @@ internal class TemplateServiceAsyncTest {
apiResponseTemplate.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun list() {
- val client =
- SentDmOkHttpClientAsync.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClientAsync.builder().apiKey("My API Key").build()
val templateServiceAsync = client.templates()
val templatesFuture =
@@ -444,14 +425,10 @@ internal class TemplateServiceAsyncTest {
templates.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun delete() {
- val client =
- SentDmOkHttpClientAsync.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClientAsync.builder().apiKey("My API Key").build()
val templateServiceAsync = client.templates()
val future =
diff --git a/sent-dm-java-core/src/test/kotlin/dm/sent/services/async/UserServiceAsyncTest.kt b/sent-dm-java-core/src/test/kotlin/dm/sent/services/async/UserServiceAsyncTest.kt
index 2a48e6de..288145bf 100644
--- a/sent-dm-java-core/src/test/kotlin/dm/sent/services/async/UserServiceAsyncTest.kt
+++ b/sent-dm-java-core/src/test/kotlin/dm/sent/services/async/UserServiceAsyncTest.kt
@@ -2,26 +2,19 @@
package dm.sent.services.async
-import dm.sent.TestServerExtension
import dm.sent.client.okhttp.SentDmOkHttpClientAsync
import dm.sent.models.users.UserInviteParams
import dm.sent.models.users.UserRemoveParams
import dm.sent.models.users.UserUpdateRoleParams
import org.junit.jupiter.api.Disabled
import org.junit.jupiter.api.Test
-import org.junit.jupiter.api.extension.ExtendWith
-@ExtendWith(TestServerExtension::class)
internal class UserServiceAsyncTest {
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun retrieve() {
- val client =
- SentDmOkHttpClientAsync.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClientAsync.builder().apiKey("My API Key").build()
val userServiceAsync = client.users()
val apiResponseOfUserFuture =
@@ -31,14 +24,10 @@ internal class UserServiceAsyncTest {
apiResponseOfUser.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun list() {
- val client =
- SentDmOkHttpClientAsync.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClientAsync.builder().apiKey("My API Key").build()
val userServiceAsync = client.users()
val usersFuture = userServiceAsync.list()
@@ -47,14 +36,10 @@ internal class UserServiceAsyncTest {
users.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun invite() {
- val client =
- SentDmOkHttpClientAsync.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClientAsync.builder().apiKey("My API Key").build()
val userServiceAsync = client.users()
val apiResponseOfUserFuture =
@@ -72,14 +57,10 @@ internal class UserServiceAsyncTest {
apiResponseOfUser.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun remove() {
- val client =
- SentDmOkHttpClientAsync.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClientAsync.builder().apiKey("My API Key").build()
val userServiceAsync = client.users()
val future =
@@ -94,14 +75,10 @@ internal class UserServiceAsyncTest {
val response = future.get()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun updateRole() {
- val client =
- SentDmOkHttpClientAsync.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClientAsync.builder().apiKey("My API Key").build()
val userServiceAsync = client.users()
val apiResponseOfUserFuture =
diff --git a/sent-dm-java-core/src/test/kotlin/dm/sent/services/async/WebhookServiceAsyncTest.kt b/sent-dm-java-core/src/test/kotlin/dm/sent/services/async/WebhookServiceAsyncTest.kt
index 5e371709..f5177aae 100644
--- a/sent-dm-java-core/src/test/kotlin/dm/sent/services/async/WebhookServiceAsyncTest.kt
+++ b/sent-dm-java-core/src/test/kotlin/dm/sent/services/async/WebhookServiceAsyncTest.kt
@@ -2,7 +2,6 @@
package dm.sent.services.async
-import dm.sent.TestServerExtension
import dm.sent.client.okhttp.SentDmOkHttpClientAsync
import dm.sent.models.webhooks.WebhookCreateParams
import dm.sent.models.webhooks.WebhookListEventsParams
@@ -13,19 +12,13 @@ import dm.sent.models.webhooks.WebhookToggleStatusParams
import dm.sent.models.webhooks.WebhookUpdateParams
import org.junit.jupiter.api.Disabled
import org.junit.jupiter.api.Test
-import org.junit.jupiter.api.extension.ExtendWith
-@ExtendWith(TestServerExtension::class)
internal class WebhookServiceAsyncTest {
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun create() {
- val client =
- SentDmOkHttpClientAsync.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClientAsync.builder().apiKey("My API Key").build()
val webhookServiceAsync = client.webhooks()
val apiResponseWebhookFuture =
@@ -46,14 +39,10 @@ internal class WebhookServiceAsyncTest {
apiResponseWebhook.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun retrieve() {
- val client =
- SentDmOkHttpClientAsync.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClientAsync.builder().apiKey("My API Key").build()
val webhookServiceAsync = client.webhooks()
val apiResponseWebhookFuture =
@@ -63,14 +52,10 @@ internal class WebhookServiceAsyncTest {
apiResponseWebhook.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun update() {
- val client =
- SentDmOkHttpClientAsync.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClientAsync.builder().apiKey("My API Key").build()
val webhookServiceAsync = client.webhooks()
val apiResponseWebhookFuture =
@@ -92,14 +77,10 @@ internal class WebhookServiceAsyncTest {
apiResponseWebhook.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun list() {
- val client =
- SentDmOkHttpClientAsync.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClientAsync.builder().apiKey("My API Key").build()
val webhookServiceAsync = client.webhooks()
val webhooksFuture =
@@ -116,14 +97,10 @@ internal class WebhookServiceAsyncTest {
webhooks.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun delete() {
- val client =
- SentDmOkHttpClientAsync.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClientAsync.builder().apiKey("My API Key").build()
val webhookServiceAsync = client.webhooks()
val future = webhookServiceAsync.delete("d4f5a6b7-c8d9-4e0f-a1b2-c3d4e5f6a7b8")
@@ -131,14 +108,10 @@ internal class WebhookServiceAsyncTest {
val response = future.get()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun listEventTypes() {
- val client =
- SentDmOkHttpClientAsync.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClientAsync.builder().apiKey("My API Key").build()
val webhookServiceAsync = client.webhooks()
val responseFuture = webhookServiceAsync.listEventTypes()
@@ -147,14 +120,10 @@ internal class WebhookServiceAsyncTest {
response.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun listEvents() {
- val client =
- SentDmOkHttpClientAsync.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClientAsync.builder().apiKey("My API Key").build()
val webhookServiceAsync = client.webhooks()
val responseFuture =
@@ -171,14 +140,10 @@ internal class WebhookServiceAsyncTest {
response.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun rotateSecret() {
- val client =
- SentDmOkHttpClientAsync.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClientAsync.builder().apiKey("My API Key").build()
val webhookServiceAsync = client.webhooks()
val responseFuture =
@@ -194,14 +159,10 @@ internal class WebhookServiceAsyncTest {
response.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun test() {
- val client =
- SentDmOkHttpClientAsync.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClientAsync.builder().apiKey("My API Key").build()
val webhookServiceAsync = client.webhooks()
val responseFuture =
@@ -218,14 +179,10 @@ internal class WebhookServiceAsyncTest {
response.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun toggleStatus() {
- val client =
- SentDmOkHttpClientAsync.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClientAsync.builder().apiKey("My API Key").build()
val webhookServiceAsync = client.webhooks()
val apiResponseWebhookFuture =
diff --git a/sent-dm-java-core/src/test/kotlin/dm/sent/services/async/brands/CampaignServiceAsyncTest.kt b/sent-dm-java-core/src/test/kotlin/dm/sent/services/async/brands/CampaignServiceAsyncTest.kt
index b7ee3c35..eeb3fda5 100644
--- a/sent-dm-java-core/src/test/kotlin/dm/sent/services/async/brands/CampaignServiceAsyncTest.kt
+++ b/sent-dm-java-core/src/test/kotlin/dm/sent/services/async/brands/CampaignServiceAsyncTest.kt
@@ -2,7 +2,6 @@
package dm.sent.services.async.brands
-import dm.sent.TestServerExtension
import dm.sent.client.okhttp.SentDmOkHttpClientAsync
import dm.sent.models.brands.campaigns.CampaignCreateParams
import dm.sent.models.brands.campaigns.CampaignData
@@ -12,19 +11,13 @@ import dm.sent.models.brands.campaigns.MessagingUseCaseUs
import dm.sent.models.brands.campaigns.SentDmServicesEndpointsCustomerApIv3ContractsRequestsCampaignsCampaignUseCaseData
import org.junit.jupiter.api.Disabled
import org.junit.jupiter.api.Test
-import org.junit.jupiter.api.extension.ExtendWith
-@ExtendWith(TestServerExtension::class)
internal class CampaignServiceAsyncTest {
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun create() {
- val client =
- SentDmOkHttpClientAsync.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClientAsync.builder().apiKey("My API Key").build()
val campaignServiceAsync = client.brands().campaigns()
val apiResponseTcrCampaignWithUseCasesFuture =
@@ -76,14 +69,10 @@ internal class CampaignServiceAsyncTest {
apiResponseTcrCampaignWithUseCases.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun update() {
- val client =
- SentDmOkHttpClientAsync.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClientAsync.builder().apiKey("My API Key").build()
val campaignServiceAsync = client.brands().campaigns()
val apiResponseTcrCampaignWithUseCasesFuture =
@@ -130,14 +119,10 @@ internal class CampaignServiceAsyncTest {
apiResponseTcrCampaignWithUseCases.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun list() {
- val client =
- SentDmOkHttpClientAsync.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClientAsync.builder().apiKey("My API Key").build()
val campaignServiceAsync = client.brands().campaigns()
val campaignsFuture = campaignServiceAsync.list("a1b2c3d4-e5f6-7890-abcd-ef1234567890")
@@ -146,14 +131,10 @@ internal class CampaignServiceAsyncTest {
campaigns.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun delete() {
- val client =
- SentDmOkHttpClientAsync.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClientAsync.builder().apiKey("My API Key").build()
val campaignServiceAsync = client.brands().campaigns()
val future =
diff --git a/sent-dm-java-core/src/test/kotlin/dm/sent/services/blocking/BrandServiceTest.kt b/sent-dm-java-core/src/test/kotlin/dm/sent/services/blocking/BrandServiceTest.kt
index 47566627..01edb3e6 100644
--- a/sent-dm-java-core/src/test/kotlin/dm/sent/services/blocking/BrandServiceTest.kt
+++ b/sent-dm-java-core/src/test/kotlin/dm/sent/services/blocking/BrandServiceTest.kt
@@ -2,7 +2,6 @@
package dm.sent.services.blocking
-import dm.sent.TestServerExtension
import dm.sent.client.okhttp.SentDmOkHttpClient
import dm.sent.models.brands.BrandCreateParams
import dm.sent.models.brands.BrandData
@@ -13,19 +12,13 @@ import dm.sent.models.brands.TcrBrandRelationship
import dm.sent.models.brands.TcrVertical
import org.junit.jupiter.api.Disabled
import org.junit.jupiter.api.Test
-import org.junit.jupiter.api.extension.ExtendWith
-@ExtendWith(TestServerExtension::class)
internal class BrandServiceTest {
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun create() {
- val client =
- SentDmOkHttpClient.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClient.builder().apiKey("My API Key").build()
val brandService = client.brands()
val apiResponseBrandWithKyc =
@@ -71,14 +64,10 @@ internal class BrandServiceTest {
apiResponseBrandWithKyc.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun update() {
- val client =
- SentDmOkHttpClient.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClient.builder().apiKey("My API Key").build()
val brandService = client.brands()
val apiResponseBrandWithKyc =
@@ -125,14 +114,10 @@ internal class BrandServiceTest {
apiResponseBrandWithKyc.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun list() {
- val client =
- SentDmOkHttpClient.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClient.builder().apiKey("My API Key").build()
val brandService = client.brands()
val brands = brandService.list()
@@ -140,14 +125,10 @@ internal class BrandServiceTest {
brands.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun delete() {
- val client =
- SentDmOkHttpClient.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClient.builder().apiKey("My API Key").build()
val brandService = client.brands()
brandService.delete(
diff --git a/sent-dm-java-core/src/test/kotlin/dm/sent/services/blocking/ContactServiceTest.kt b/sent-dm-java-core/src/test/kotlin/dm/sent/services/blocking/ContactServiceTest.kt
index 22804f6c..24ceffb2 100644
--- a/sent-dm-java-core/src/test/kotlin/dm/sent/services/blocking/ContactServiceTest.kt
+++ b/sent-dm-java-core/src/test/kotlin/dm/sent/services/blocking/ContactServiceTest.kt
@@ -2,7 +2,6 @@
package dm.sent.services.blocking
-import dm.sent.TestServerExtension
import dm.sent.client.okhttp.SentDmOkHttpClient
import dm.sent.models.contacts.ContactCreateParams
import dm.sent.models.contacts.ContactDeleteParams
@@ -10,19 +9,13 @@ import dm.sent.models.contacts.ContactListParams
import dm.sent.models.contacts.ContactUpdateParams
import org.junit.jupiter.api.Disabled
import org.junit.jupiter.api.Test
-import org.junit.jupiter.api.extension.ExtendWith
-@ExtendWith(TestServerExtension::class)
internal class ContactServiceTest {
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun create() {
- val client =
- SentDmOkHttpClient.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClient.builder().apiKey("My API Key").build()
val contactService = client.contacts()
val apiResponseContact =
@@ -37,14 +30,10 @@ internal class ContactServiceTest {
apiResponseContact.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun retrieve() {
- val client =
- SentDmOkHttpClient.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClient.builder().apiKey("My API Key").build()
val contactService = client.contacts()
val apiResponseContact = contactService.retrieve("6ba7b810-9dad-11d1-80b4-00c04fd430c8")
@@ -52,14 +41,10 @@ internal class ContactServiceTest {
apiResponseContact.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun update() {
- val client =
- SentDmOkHttpClient.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClient.builder().apiKey("My API Key").build()
val contactService = client.contacts()
val apiResponseContact =
@@ -76,14 +61,10 @@ internal class ContactServiceTest {
apiResponseContact.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun list() {
- val client =
- SentDmOkHttpClient.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClient.builder().apiKey("My API Key").build()
val contactService = client.contacts()
val contacts =
@@ -100,14 +81,10 @@ internal class ContactServiceTest {
contacts.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun delete() {
- val client =
- SentDmOkHttpClient.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClient.builder().apiKey("My API Key").build()
val contactService = client.contacts()
contactService.delete(
diff --git a/sent-dm-java-core/src/test/kotlin/dm/sent/services/blocking/LookupServiceTest.kt b/sent-dm-java-core/src/test/kotlin/dm/sent/services/blocking/LookupServiceTest.kt
index d3decc43..12819b17 100644
--- a/sent-dm-java-core/src/test/kotlin/dm/sent/services/blocking/LookupServiceTest.kt
+++ b/sent-dm-java-core/src/test/kotlin/dm/sent/services/blocking/LookupServiceTest.kt
@@ -2,23 +2,16 @@
package dm.sent.services.blocking
-import dm.sent.TestServerExtension
import dm.sent.client.okhttp.SentDmOkHttpClient
import org.junit.jupiter.api.Disabled
import org.junit.jupiter.api.Test
-import org.junit.jupiter.api.extension.ExtendWith
-@ExtendWith(TestServerExtension::class)
internal class LookupServiceTest {
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun retrievePhoneInfo() {
- val client =
- SentDmOkHttpClient.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClient.builder().apiKey("My API Key").build()
val lookupService = client.lookup()
val response = lookupService.retrievePhoneInfo("phoneNumber")
diff --git a/sent-dm-java-core/src/test/kotlin/dm/sent/services/blocking/MeServiceTest.kt b/sent-dm-java-core/src/test/kotlin/dm/sent/services/blocking/MeServiceTest.kt
index 7772b610..5a2686ef 100644
--- a/sent-dm-java-core/src/test/kotlin/dm/sent/services/blocking/MeServiceTest.kt
+++ b/sent-dm-java-core/src/test/kotlin/dm/sent/services/blocking/MeServiceTest.kt
@@ -2,23 +2,16 @@
package dm.sent.services.blocking
-import dm.sent.TestServerExtension
import dm.sent.client.okhttp.SentDmOkHttpClient
import org.junit.jupiter.api.Disabled
import org.junit.jupiter.api.Test
-import org.junit.jupiter.api.extension.ExtendWith
-@ExtendWith(TestServerExtension::class)
internal class MeServiceTest {
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun retrieve() {
- val client =
- SentDmOkHttpClient.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClient.builder().apiKey("My API Key").build()
val meService = client.me()
val me = meService.retrieve()
diff --git a/sent-dm-java-core/src/test/kotlin/dm/sent/services/blocking/MessageServiceTest.kt b/sent-dm-java-core/src/test/kotlin/dm/sent/services/blocking/MessageServiceTest.kt
index e517789f..2616b071 100644
--- a/sent-dm-java-core/src/test/kotlin/dm/sent/services/blocking/MessageServiceTest.kt
+++ b/sent-dm-java-core/src/test/kotlin/dm/sent/services/blocking/MessageServiceTest.kt
@@ -2,25 +2,18 @@
package dm.sent.services.blocking
-import dm.sent.TestServerExtension
import dm.sent.client.okhttp.SentDmOkHttpClient
import dm.sent.core.JsonValue
import dm.sent.models.messages.MessageSendParams
import org.junit.jupiter.api.Disabled
import org.junit.jupiter.api.Test
-import org.junit.jupiter.api.extension.ExtendWith
-@ExtendWith(TestServerExtension::class)
internal class MessageServiceTest {
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun retrieveActivities() {
- val client =
- SentDmOkHttpClient.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClient.builder().apiKey("My API Key").build()
val messageService = client.messages()
val response = messageService.retrieveActivities("8ba7b830-9dad-11d1-80b4-00c04fd430c8")
@@ -28,14 +21,10 @@ internal class MessageServiceTest {
response.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun retrieveStatus() {
- val client =
- SentDmOkHttpClient.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClient.builder().apiKey("My API Key").build()
val messageService = client.messages()
val response = messageService.retrieveStatus("8ba7b830-9dad-11d1-80b4-00c04fd430c8")
@@ -43,14 +32,10 @@ internal class MessageServiceTest {
response.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun send() {
- val client =
- SentDmOkHttpClient.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClient.builder().apiKey("My API Key").build()
val messageService = client.messages()
val response =
diff --git a/sent-dm-java-core/src/test/kotlin/dm/sent/services/blocking/ProfileServiceTest.kt b/sent-dm-java-core/src/test/kotlin/dm/sent/services/blocking/ProfileServiceTest.kt
index e759b36b..3776fed2 100644
--- a/sent-dm-java-core/src/test/kotlin/dm/sent/services/blocking/ProfileServiceTest.kt
+++ b/sent-dm-java-core/src/test/kotlin/dm/sent/services/blocking/ProfileServiceTest.kt
@@ -2,7 +2,6 @@
package dm.sent.services.blocking
-import dm.sent.TestServerExtension
import dm.sent.client.okhttp.SentDmOkHttpClient
import dm.sent.models.profiles.ProfileCompleteParams
import dm.sent.models.profiles.ProfileCreateParams
@@ -10,19 +9,13 @@ import dm.sent.models.profiles.ProfileDeleteParams
import dm.sent.models.profiles.ProfileUpdateParams
import org.junit.jupiter.api.Disabled
import org.junit.jupiter.api.Test
-import org.junit.jupiter.api.extension.ExtendWith
-@ExtendWith(TestServerExtension::class)
internal class ProfileServiceTest {
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun create() {
- val client =
- SentDmOkHttpClient.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClient.builder().apiKey("My API Key").build()
val profileService = client.profiles()
val apiResponseOfProfileDetail =
@@ -47,14 +40,10 @@ internal class ProfileServiceTest {
apiResponseOfProfileDetail.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun retrieve() {
- val client =
- SentDmOkHttpClient.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClient.builder().apiKey("My API Key").build()
val profileService = client.profiles()
val apiResponseOfProfileDetail =
@@ -63,14 +52,10 @@ internal class ProfileServiceTest {
apiResponseOfProfileDetail.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun update() {
- val client =
- SentDmOkHttpClient.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClient.builder().apiKey("My API Key").build()
val profileService = client.profiles()
val apiResponseOfProfileDetail =
@@ -102,14 +87,10 @@ internal class ProfileServiceTest {
apiResponseOfProfileDetail.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun list() {
- val client =
- SentDmOkHttpClient.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClient.builder().apiKey("My API Key").build()
val profileService = client.profiles()
val profiles = profileService.list()
@@ -117,14 +98,10 @@ internal class ProfileServiceTest {
profiles.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun delete() {
- val client =
- SentDmOkHttpClient.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClient.builder().apiKey("My API Key").build()
val profileService = client.profiles()
profileService.delete(
@@ -136,14 +113,10 @@ internal class ProfileServiceTest {
)
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun complete() {
- val client =
- SentDmOkHttpClient.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClient.builder().apiKey("My API Key").build()
val profileService = client.profiles()
val response =
diff --git a/sent-dm-java-core/src/test/kotlin/dm/sent/services/blocking/TemplateServiceTest.kt b/sent-dm-java-core/src/test/kotlin/dm/sent/services/blocking/TemplateServiceTest.kt
index 154ea373..e904517d 100644
--- a/sent-dm-java-core/src/test/kotlin/dm/sent/services/blocking/TemplateServiceTest.kt
+++ b/sent-dm-java-core/src/test/kotlin/dm/sent/services/blocking/TemplateServiceTest.kt
@@ -2,7 +2,6 @@
package dm.sent.services.blocking
-import dm.sent.TestServerExtension
import dm.sent.client.okhttp.SentDmOkHttpClient
import dm.sent.models.templates.SentDmServicesCommonContractsPocOsAuthenticationConfig
import dm.sent.models.templates.SentDmServicesCommonContractsPocOsTemplateBody
@@ -19,19 +18,13 @@ import dm.sent.models.templates.TemplateUpdateParams
import dm.sent.models.templates.TemplateVariable
import org.junit.jupiter.api.Disabled
import org.junit.jupiter.api.Test
-import org.junit.jupiter.api.extension.ExtendWith
-@ExtendWith(TestServerExtension::class)
internal class TemplateServiceTest {
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun create() {
- val client =
- SentDmOkHttpClient.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClient.builder().apiKey("My API Key").build()
val templateService = client.templates()
val apiResponseTemplate =
@@ -221,14 +214,10 @@ internal class TemplateServiceTest {
apiResponseTemplate.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun retrieve() {
- val client =
- SentDmOkHttpClient.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClient.builder().apiKey("My API Key").build()
val templateService = client.templates()
val apiResponseTemplate = templateService.retrieve("7ba7b820-9dad-11d1-80b4-00c04fd430c8")
@@ -236,14 +225,10 @@ internal class TemplateServiceTest {
apiResponseTemplate.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun update() {
- val client =
- SentDmOkHttpClient.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClient.builder().apiKey("My API Key").build()
val templateService = client.templates()
val apiResponseTemplate =
@@ -415,14 +400,10 @@ internal class TemplateServiceTest {
apiResponseTemplate.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun list() {
- val client =
- SentDmOkHttpClient.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClient.builder().apiKey("My API Key").build()
val templateService = client.templates()
val templates =
@@ -439,14 +420,10 @@ internal class TemplateServiceTest {
templates.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun delete() {
- val client =
- SentDmOkHttpClient.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClient.builder().apiKey("My API Key").build()
val templateService = client.templates()
templateService.delete(
diff --git a/sent-dm-java-core/src/test/kotlin/dm/sent/services/blocking/UserServiceTest.kt b/sent-dm-java-core/src/test/kotlin/dm/sent/services/blocking/UserServiceTest.kt
index c3f67da9..e1c641cb 100644
--- a/sent-dm-java-core/src/test/kotlin/dm/sent/services/blocking/UserServiceTest.kt
+++ b/sent-dm-java-core/src/test/kotlin/dm/sent/services/blocking/UserServiceTest.kt
@@ -2,26 +2,19 @@
package dm.sent.services.blocking
-import dm.sent.TestServerExtension
import dm.sent.client.okhttp.SentDmOkHttpClient
import dm.sent.models.users.UserInviteParams
import dm.sent.models.users.UserRemoveParams
import dm.sent.models.users.UserUpdateRoleParams
import org.junit.jupiter.api.Disabled
import org.junit.jupiter.api.Test
-import org.junit.jupiter.api.extension.ExtendWith
-@ExtendWith(TestServerExtension::class)
internal class UserServiceTest {
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun retrieve() {
- val client =
- SentDmOkHttpClient.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClient.builder().apiKey("My API Key").build()
val userService = client.users()
val apiResponseOfUser = userService.retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
@@ -29,14 +22,10 @@ internal class UserServiceTest {
apiResponseOfUser.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun list() {
- val client =
- SentDmOkHttpClient.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClient.builder().apiKey("My API Key").build()
val userService = client.users()
val users = userService.list()
@@ -44,14 +33,10 @@ internal class UserServiceTest {
users.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun invite() {
- val client =
- SentDmOkHttpClient.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClient.builder().apiKey("My API Key").build()
val userService = client.users()
val apiResponseOfUser =
@@ -68,14 +53,10 @@ internal class UserServiceTest {
apiResponseOfUser.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun remove() {
- val client =
- SentDmOkHttpClient.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClient.builder().apiKey("My API Key").build()
val userService = client.users()
userService.remove(
@@ -87,14 +68,10 @@ internal class UserServiceTest {
)
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun updateRole() {
- val client =
- SentDmOkHttpClient.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClient.builder().apiKey("My API Key").build()
val userService = client.users()
val apiResponseOfUser =
diff --git a/sent-dm-java-core/src/test/kotlin/dm/sent/services/blocking/WebhookServiceTest.kt b/sent-dm-java-core/src/test/kotlin/dm/sent/services/blocking/WebhookServiceTest.kt
index bf738d53..5858ce01 100644
--- a/sent-dm-java-core/src/test/kotlin/dm/sent/services/blocking/WebhookServiceTest.kt
+++ b/sent-dm-java-core/src/test/kotlin/dm/sent/services/blocking/WebhookServiceTest.kt
@@ -2,7 +2,6 @@
package dm.sent.services.blocking
-import dm.sent.TestServerExtension
import dm.sent.client.okhttp.SentDmOkHttpClient
import dm.sent.models.webhooks.WebhookCreateParams
import dm.sent.models.webhooks.WebhookListEventsParams
@@ -13,19 +12,13 @@ import dm.sent.models.webhooks.WebhookToggleStatusParams
import dm.sent.models.webhooks.WebhookUpdateParams
import org.junit.jupiter.api.Disabled
import org.junit.jupiter.api.Test
-import org.junit.jupiter.api.extension.ExtendWith
-@ExtendWith(TestServerExtension::class)
internal class WebhookServiceTest {
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun create() {
- val client =
- SentDmOkHttpClient.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClient.builder().apiKey("My API Key").build()
val webhookService = client.webhooks()
val apiResponseWebhook =
@@ -45,14 +38,10 @@ internal class WebhookServiceTest {
apiResponseWebhook.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun retrieve() {
- val client =
- SentDmOkHttpClient.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClient.builder().apiKey("My API Key").build()
val webhookService = client.webhooks()
val apiResponseWebhook = webhookService.retrieve("d4f5a6b7-c8d9-4e0f-a1b2-c3d4e5f6a7b8")
@@ -60,14 +49,10 @@ internal class WebhookServiceTest {
apiResponseWebhook.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun update() {
- val client =
- SentDmOkHttpClient.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClient.builder().apiKey("My API Key").build()
val webhookService = client.webhooks()
val apiResponseWebhook =
@@ -88,14 +73,10 @@ internal class WebhookServiceTest {
apiResponseWebhook.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun list() {
- val client =
- SentDmOkHttpClient.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClient.builder().apiKey("My API Key").build()
val webhookService = client.webhooks()
val webhooks =
@@ -111,27 +92,19 @@ internal class WebhookServiceTest {
webhooks.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun delete() {
- val client =
- SentDmOkHttpClient.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClient.builder().apiKey("My API Key").build()
val webhookService = client.webhooks()
webhookService.delete("d4f5a6b7-c8d9-4e0f-a1b2-c3d4e5f6a7b8")
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun listEventTypes() {
- val client =
- SentDmOkHttpClient.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClient.builder().apiKey("My API Key").build()
val webhookService = client.webhooks()
val response = webhookService.listEventTypes()
@@ -139,14 +112,10 @@ internal class WebhookServiceTest {
response.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun listEvents() {
- val client =
- SentDmOkHttpClient.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClient.builder().apiKey("My API Key").build()
val webhookService = client.webhooks()
val response =
@@ -162,14 +131,10 @@ internal class WebhookServiceTest {
response.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun rotateSecret() {
- val client =
- SentDmOkHttpClient.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClient.builder().apiKey("My API Key").build()
val webhookService = client.webhooks()
val response =
@@ -184,14 +149,10 @@ internal class WebhookServiceTest {
response.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun test() {
- val client =
- SentDmOkHttpClient.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClient.builder().apiKey("My API Key").build()
val webhookService = client.webhooks()
val response =
@@ -207,14 +168,10 @@ internal class WebhookServiceTest {
response.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun toggleStatus() {
- val client =
- SentDmOkHttpClient.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClient.builder().apiKey("My API Key").build()
val webhookService = client.webhooks()
val apiResponseWebhook =
diff --git a/sent-dm-java-core/src/test/kotlin/dm/sent/services/blocking/brands/CampaignServiceTest.kt b/sent-dm-java-core/src/test/kotlin/dm/sent/services/blocking/brands/CampaignServiceTest.kt
index 936c316b..ae6621a2 100644
--- a/sent-dm-java-core/src/test/kotlin/dm/sent/services/blocking/brands/CampaignServiceTest.kt
+++ b/sent-dm-java-core/src/test/kotlin/dm/sent/services/blocking/brands/CampaignServiceTest.kt
@@ -2,7 +2,6 @@
package dm.sent.services.blocking.brands
-import dm.sent.TestServerExtension
import dm.sent.client.okhttp.SentDmOkHttpClient
import dm.sent.models.brands.campaigns.CampaignCreateParams
import dm.sent.models.brands.campaigns.CampaignData
@@ -12,19 +11,13 @@ import dm.sent.models.brands.campaigns.MessagingUseCaseUs
import dm.sent.models.brands.campaigns.SentDmServicesEndpointsCustomerApIv3ContractsRequestsCampaignsCampaignUseCaseData
import org.junit.jupiter.api.Disabled
import org.junit.jupiter.api.Test
-import org.junit.jupiter.api.extension.ExtendWith
-@ExtendWith(TestServerExtension::class)
internal class CampaignServiceTest {
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun create() {
- val client =
- SentDmOkHttpClient.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClient.builder().apiKey("My API Key").build()
val campaignService = client.brands().campaigns()
val apiResponseTcrCampaignWithUseCases =
@@ -75,14 +68,10 @@ internal class CampaignServiceTest {
apiResponseTcrCampaignWithUseCases.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun update() {
- val client =
- SentDmOkHttpClient.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClient.builder().apiKey("My API Key").build()
val campaignService = client.brands().campaigns()
val apiResponseTcrCampaignWithUseCases =
@@ -128,14 +117,10 @@ internal class CampaignServiceTest {
apiResponseTcrCampaignWithUseCases.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun list() {
- val client =
- SentDmOkHttpClient.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClient.builder().apiKey("My API Key").build()
val campaignService = client.brands().campaigns()
val campaigns = campaignService.list("a1b2c3d4-e5f6-7890-abcd-ef1234567890")
@@ -143,14 +128,10 @@ internal class CampaignServiceTest {
campaigns.validate()
}
- @Disabled("Prism tests are disabled")
+ @Disabled("Mock server tests are disabled")
@Test
fun delete() {
- val client =
- SentDmOkHttpClient.builder()
- .baseUrl(TestServerExtension.BASE_URL)
- .apiKey("My API Key")
- .build()
+ val client = SentDmOkHttpClient.builder().apiKey("My API Key").build()
val campaignService = client.brands().campaigns()
campaignService.delete(