Skip to content

Commit 34d975a

Browse files
chore(internal): remove mock server code
1 parent 50588f3 commit 34d975a

File tree

5 files changed

+32
-302
lines changed

5 files changed

+32
-302
lines changed

brand-dev-java-core/src/test/kotlin/com/branddev/api/TestServerExtension.kt

Lines changed: 0 additions & 49 deletions
This file was deleted.

brand-dev-java-core/src/test/kotlin/com/branddev/api/services/async/BrandServiceAsyncTest.kt

Lines changed: 16 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
package com.branddev.api.services.async
44

5-
import com.branddev.api.TestServerExtension
65
import com.branddev.api.client.okhttp.BrandDevOkHttpClientAsync
76
import com.branddev.api.core.JsonValue
87
import com.branddev.api.models.brand.BrandAiProductParams
@@ -23,19 +22,13 @@ import com.branddev.api.models.brand.BrandScreenshotParams
2322
import com.branddev.api.models.brand.BrandStyleguideParams
2423
import org.junit.jupiter.api.Disabled
2524
import org.junit.jupiter.api.Test
26-
import org.junit.jupiter.api.extension.ExtendWith
2725

28-
@ExtendWith(TestServerExtension::class)
2926
internal class BrandServiceAsyncTest {
3027

3128
@Disabled("Prism tests are disabled")
3229
@Test
3330
fun retrieve() {
34-
val client =
35-
BrandDevOkHttpClientAsync.builder()
36-
.baseUrl(TestServerExtension.BASE_URL)
37-
.apiKey("My API Key")
38-
.build()
31+
val client = BrandDevOkHttpClientAsync.builder().apiKey("My API Key").build()
3932
val brandServiceAsync = client.brand()
4033

4134
val brandFuture =
@@ -55,11 +48,7 @@ internal class BrandServiceAsyncTest {
5548
@Disabled("Prism tests are disabled")
5649
@Test
5750
fun aiProduct() {
58-
val client =
59-
BrandDevOkHttpClientAsync.builder()
60-
.baseUrl(TestServerExtension.BASE_URL)
61-
.apiKey("My API Key")
62-
.build()
51+
val client = BrandDevOkHttpClientAsync.builder().apiKey("My API Key").build()
6352
val brandServiceAsync = client.brand()
6453

6554
val responseFuture =
@@ -74,11 +63,7 @@ internal class BrandServiceAsyncTest {
7463
@Disabled("Prism tests are disabled")
7564
@Test
7665
fun aiProducts() {
77-
val client =
78-
BrandDevOkHttpClientAsync.builder()
79-
.baseUrl(TestServerExtension.BASE_URL)
80-
.apiKey("My API Key")
81-
.build()
66+
val client = BrandDevOkHttpClientAsync.builder().apiKey("My API Key").build()
8267
val brandServiceAsync = client.brand()
8368

8469
val responseFuture =
@@ -97,11 +82,7 @@ internal class BrandServiceAsyncTest {
9782
@Disabled("Prism tests are disabled")
9883
@Test
9984
fun aiQuery() {
100-
val client =
101-
BrandDevOkHttpClientAsync.builder()
102-
.baseUrl(TestServerExtension.BASE_URL)
103-
.apiKey("My API Key")
104-
.build()
85+
val client = BrandDevOkHttpClientAsync.builder().apiKey("My API Key").build()
10586
val brandServiceAsync = client.brand()
10687

10788
val responseFuture =
@@ -155,11 +136,7 @@ internal class BrandServiceAsyncTest {
155136
@Disabled("Prism tests are disabled")
156137
@Test
157138
fun fonts() {
158-
val client =
159-
BrandDevOkHttpClientAsync.builder()
160-
.baseUrl(TestServerExtension.BASE_URL)
161-
.apiKey("My API Key")
162-
.build()
139+
val client = BrandDevOkHttpClientAsync.builder().apiKey("My API Key").build()
163140
val brandServiceAsync = client.brand()
164141

165142
val responseFuture =
@@ -174,11 +151,7 @@ internal class BrandServiceAsyncTest {
174151
@Disabled("Prism tests are disabled")
175152
@Test
176153
fun identifyFromTransaction() {
177-
val client =
178-
BrandDevOkHttpClientAsync.builder()
179-
.baseUrl(TestServerExtension.BASE_URL)
180-
.apiKey("My API Key")
181-
.build()
154+
val client = BrandDevOkHttpClientAsync.builder().apiKey("My API Key").build()
182155
val brandServiceAsync = client.brand()
183156

184157
val responseFuture =
@@ -202,11 +175,7 @@ internal class BrandServiceAsyncTest {
202175
@Disabled("Prism tests are disabled")
203176
@Test
204177
fun prefetch() {
205-
val client =
206-
BrandDevOkHttpClientAsync.builder()
207-
.baseUrl(TestServerExtension.BASE_URL)
208-
.apiKey("My API Key")
209-
.build()
178+
val client = BrandDevOkHttpClientAsync.builder().apiKey("My API Key").build()
210179
val brandServiceAsync = client.brand()
211180

212181
val responseFuture =
@@ -221,11 +190,7 @@ internal class BrandServiceAsyncTest {
221190
@Disabled("Prism tests are disabled")
222191
@Test
223192
fun prefetchByEmail() {
224-
val client =
225-
BrandDevOkHttpClientAsync.builder()
226-
.baseUrl(TestServerExtension.BASE_URL)
227-
.apiKey("My API Key")
228-
.build()
193+
val client = BrandDevOkHttpClientAsync.builder().apiKey("My API Key").build()
229194
val brandServiceAsync = client.brand()
230195

231196
val responseFuture =
@@ -243,11 +208,7 @@ internal class BrandServiceAsyncTest {
243208
@Disabled("Prism tests are disabled")
244209
@Test
245210
fun retrieveByEmail() {
246-
val client =
247-
BrandDevOkHttpClientAsync.builder()
248-
.baseUrl(TestServerExtension.BASE_URL)
249-
.apiKey("My API Key")
250-
.build()
211+
val client = BrandDevOkHttpClientAsync.builder().apiKey("My API Key").build()
251212
val brandServiceAsync = client.brand()
252213

253214
val responseFuture =
@@ -267,11 +228,7 @@ internal class BrandServiceAsyncTest {
267228
@Disabled("Prism tests are disabled")
268229
@Test
269230
fun retrieveByIsin() {
270-
val client =
271-
BrandDevOkHttpClientAsync.builder()
272-
.baseUrl(TestServerExtension.BASE_URL)
273-
.apiKey("My API Key")
274-
.build()
231+
val client = BrandDevOkHttpClientAsync.builder().apiKey("My API Key").build()
275232
val brandServiceAsync = client.brand()
276233

277234
val responseFuture =
@@ -291,11 +248,7 @@ internal class BrandServiceAsyncTest {
291248
@Disabled("Prism tests are disabled")
292249
@Test
293250
fun retrieveByName() {
294-
val client =
295-
BrandDevOkHttpClientAsync.builder()
296-
.baseUrl(TestServerExtension.BASE_URL)
297-
.apiKey("My API Key")
298-
.build()
251+
val client = BrandDevOkHttpClientAsync.builder().apiKey("My API Key").build()
299252
val brandServiceAsync = client.brand()
300253

301254
val responseFuture =
@@ -315,11 +268,7 @@ internal class BrandServiceAsyncTest {
315268
@Disabled("Prism tests are disabled")
316269
@Test
317270
fun retrieveByTicker() {
318-
val client =
319-
BrandDevOkHttpClientAsync.builder()
320-
.baseUrl(TestServerExtension.BASE_URL)
321-
.apiKey("My API Key")
322-
.build()
271+
val client = BrandDevOkHttpClientAsync.builder().apiKey("My API Key").build()
323272
val brandServiceAsync = client.brand()
324273

325274
val responseFuture =
@@ -340,11 +289,7 @@ internal class BrandServiceAsyncTest {
340289
@Disabled("Prism tests are disabled")
341290
@Test
342291
fun retrieveNaics() {
343-
val client =
344-
BrandDevOkHttpClientAsync.builder()
345-
.baseUrl(TestServerExtension.BASE_URL)
346-
.apiKey("My API Key")
347-
.build()
292+
val client = BrandDevOkHttpClientAsync.builder().apiKey("My API Key").build()
348293
val brandServiceAsync = client.brand()
349294

350295
val responseFuture =
@@ -364,11 +309,7 @@ internal class BrandServiceAsyncTest {
364309
@Disabled("Prism tests are disabled")
365310
@Test
366311
fun retrieveSimplified() {
367-
val client =
368-
BrandDevOkHttpClientAsync.builder()
369-
.baseUrl(TestServerExtension.BASE_URL)
370-
.apiKey("My API Key")
371-
.build()
312+
val client = BrandDevOkHttpClientAsync.builder().apiKey("My API Key").build()
372313
val brandServiceAsync = client.brand()
373314

374315
val responseFuture =
@@ -383,11 +324,7 @@ internal class BrandServiceAsyncTest {
383324
@Disabled("Prism tests are disabled")
384325
@Test
385326
fun screenshot() {
386-
val client =
387-
BrandDevOkHttpClientAsync.builder()
388-
.baseUrl(TestServerExtension.BASE_URL)
389-
.apiKey("My API Key")
390-
.build()
327+
val client = BrandDevOkHttpClientAsync.builder().apiKey("My API Key").build()
391328
val brandServiceAsync = client.brand()
392329

393330
val responseFuture =
@@ -407,11 +344,7 @@ internal class BrandServiceAsyncTest {
407344
@Disabled("Prism tests are disabled")
408345
@Test
409346
fun styleguide() {
410-
val client =
411-
BrandDevOkHttpClientAsync.builder()
412-
.baseUrl(TestServerExtension.BASE_URL)
413-
.apiKey("My API Key")
414-
.build()
347+
val client = BrandDevOkHttpClientAsync.builder().apiKey("My API Key").build()
415348
val brandServiceAsync = client.brand()
416349

417350
val responseFuture =

0 commit comments

Comments
 (0)