Skip to content

Commit

Permalink
Version 0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
SMadani committed Jun 24, 2024
1 parent 638b986 commit c26bdec
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>com.vonage</groupId>
<artifactId>kotlin-server-sdk</artifactId>
<version>0.0.1-SNAPSHOT</version>
<version>0.1.0</version>

<packaging>jar</packaging>
<name>Vonage Kotlin Server SDK</name>
Expand Down Expand Up @@ -75,7 +75,7 @@
<dependency>
<groupId>org.wiremock</groupId>
<artifactId>wiremock-standalone</artifactId>
<version>3.6.0</version>
<version>3.7.0</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
8 changes: 5 additions & 3 deletions src/test/kotlin/com/vonage/client/kt/AbstractTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,12 @@ abstract class AbstractTest {
url equalTo expectedUrl
headers contains "User-Agent" like "vonage-java-sdk\\/.+ java\\/.+"
if (authType != null) {
val headerContainsAuth = headers contains "Authorization"
val authHeaderName = "Authorization"
when (authType) {
AuthType.JWT -> headerContainsAuth like "Bearer eyJ0eXBlIjoiSldUIiwiYWxnIjoiUlMyNTYifQ(\\..+){2}"
AuthType.API_KEY_SECRET_HEADER -> headerContainsAuth equalTo "Basic $apiKeySecretEncoded"
AuthType.JWT -> headers contains authHeaderName like
"Bearer eyJ0eXBlIjoiSldUIiwiYWxnIjoiUlMyNTYifQ(\\..+){2}"
AuthType.API_KEY_SECRET_HEADER ->
headers contains authHeaderName equalTo "Basic $apiKeySecretEncoded"
AuthType.API_KEY_SECRET_QUERY_PARAMS -> {
headers contains "api_key" equalTo apiKey
headers contains "api_secret" equalTo apiSecret
Expand Down
7 changes: 1 addition & 6 deletions src/test/kotlin/com/vonage/client/kt/MessagesTest.kt
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
package com.vonage.client.kt

import com.fasterxml.jackson.databind.ObjectMapper
import com.marcinziolo.kotlin.wiremock.*
import com.vonage.client.common.HttpMethod
import com.vonage.client.messages.Channel
import com.vonage.client.messages.MessageRequest
import com.vonage.client.messages.MessageResponseException
import com.vonage.client.messages.MessageType
import com.vonage.client.messages.MessagesVersion
import com.vonage.client.messages.*
import com.vonage.client.messages.viber.Category
import com.vonage.client.messages.whatsapp.Locale
import com.vonage.client.messages.whatsapp.Policy
Expand Down

0 comments on commit c26bdec

Please sign in to comment.