Skip to content

Commit 461b9e3

Browse files
committed
feat: RequestData metadata needs to be a mutable Map
1 parent 49f4d90 commit 461b9e3

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

provider/src/main/kotlin/au/com/dius/pact/provider/RequestDataToBeVerified.kt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ interface RequestData {
1515
/**
1616
* Metadata associated with the request
1717
*/
18-
val metadata: Map<String, Any?>
18+
val metadata: MutableMap<String, Any?>
1919
}
2020

2121
/**
@@ -30,9 +30,11 @@ data class RequestDataToBeVerified(
3030
/**
3131
* Metadata associated with the request
3232
*/
33-
override val metadata: Map<String, Any?>
33+
override val metadata: MutableMap<String, Any?>
3434
): RequestData {
35-
constructor(requestData: InteractionVerificationData) : this(requestData.requestData, requestData.metadata)
35+
constructor(requestData: InteractionVerificationData) : this(
36+
requestData.requestData, requestData.metadata.toMutableMap()
37+
)
3638

3739
fun asInteractionVerificationData() = InteractionVerificationData(requestData, metadata)
3840
}

0 commit comments

Comments
 (0)