-
-
Notifications
You must be signed in to change notification settings - Fork 482
Open
Description
Hi,
I am currently trying to use an Object containing Jodatime as a parameter for the given
part.
import au.com.dius.pact.consumer.dsl.PactBuilder
import au.com.dius.pact.consumer.junit5.PactConsumerTestExt
import au.com.dius.pact.core.model.annotations.Pact
import de.europace.privatkredit.kex.vorgaenge.web.HttpConfig
import org.joda.time.LocalDate
[...]
@Pact(consumer = "CONSUMER", provider = "PROVIDER")
fun jodaTime(builder: PactBuilder) = builder
.given("joda time as parameter", "testClass", TestClass(LocalDate.now()))
.expectsToReceiveHttpInteraction("test") { httpBuilder ->
httpBuilder
.withRequest { httpRequestBuilder ->
httpRequestBuilder
.path("/test")
.method("GET")
.header(CONTENT_TYPE, "application/json")
}
.willRespondWith { httpResponseBuilder ->
httpResponseBuilder
.status(200)
}
}
.toPact()
unfortunately I then get the error:
java.lang.IllegalAccessException: class kotlin.reflect.jvm.internal.calls.CallerImpl$FieldGetter cannot access a member of class org.joda.time.LocalDate with modifiers "private final"
kotlin.reflect.full.IllegalCallableAccessException: java.lang.IllegalAccessException: class kotlin.reflect.jvm.internal.calls.CallerImpl$FieldGetter cannot access a member of class org.joda.time.LocalDate with modifiers "private final"
at kotlin.reflect.jvm.internal.KCallableImpl.call
Can you please fix this?
Metadata
Metadata
Assignees
Labels
No labels