import org.mockserver.model.HttpRequest.request
import org.mockserver.model.HttpResponse.response
import org.onap.ccsdk.cds.blueprintsprocessor.rest.RestClientProperties
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BaseBlueprintWebClientService
import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BlueprintWebClientService
import org.springframework.http.HttpHeaders
import org.springframework.http.MediaType
import java.util.Base64
class MockBlueprintWebClientService(private var restClientProperties: RestClientProperties) :
- BlueprintWebClientService {
+ BaseBlueprintWebClientService<RestClientProperties>() {
private var mockServer: ClientAndServer
private var port: String = if (restClientProperties.url.split(":")[2].isEmpty()) "8080"
)
}
+ override fun getRestClientProperties(): RestClientProperties {
+ return restClientProperties
+ }
+
override fun defaultHeaders(): Map<String, String> {
val encodedCredentials = this.setBasicAuth("admin", "aaiTest")
return mapOf(
)
}
- override fun host(uri: String): String {
- return restClientProperties.url + uri
- }
-
fun tearDown() {
mockServer.close()
}