You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Firstly, I want to express my admiration for the work you've done with Pact-JVM.
I'm reaching out to inquire about a feature in Pact-JVM that mirrors the functionality available in Pact-JS. Specifically, I'm interested in the ability to use the like matcher in a way that leverages predefined Java objects.
In our project, we extensively use integration tests with predefined data in the form of Java objects. Simple example (in real project we have ~100 fields):
We are looking for a way to utilize the like matcher in Pact-JVM that can automatically infer and check against types based on the object provided (By using reflection I suppose), similar to how it's done in Pact-JS.
I recently came across a video https://youtu.be/oPuHb9Rl8Zo?si=dmeDGDjvZA0S1blb&t=544 that demonstrates this functionality in Pact-JS. This got me wondering if there's an existing or planned feature in Pact-JVM that can achieve similar behavior. I.e (pseudocode)
@Pact(....)
publicRequestResponsePactcreateFetchCUstomerPact(PactDslWithProviderbuilder) {
MyCustomerObjectexpected = newMyCustomerObject();
expected.setName("test user");
expected.setAddress(List.of(newAddress("Test street")));
returnbuilder.given("has customer")
.uponReceiving("request of customer")
.path("/")
.method("POST")
.willRespondWith()
.status(200)
.body(PactDslJsonRootValue.like(expected) // <-- will do type matching, ignoring value
.toPact();
}
Thank you
The text was updated successfully, but these errors were encountered:
Firstly, I want to express my admiration for the work you've done with Pact-JVM.
I'm reaching out to inquire about a feature in Pact-JVM that mirrors the functionality available in Pact-JS. Specifically, I'm interested in the ability to use the like matcher in a way that leverages predefined Java objects.
In our project, we extensively use integration tests with predefined data in the form of Java objects. Simple example (in real project we have ~100 fields):
We are looking for a way to utilize the like matcher in Pact-JVM that can automatically infer and check against types based on the object provided (By using reflection I suppose), similar to how it's done in Pact-JS.
I recently came across a video https://youtu.be/oPuHb9Rl8Zo?si=dmeDGDjvZA0S1blb&t=544 that demonstrates this functionality in Pact-JS. This got me wondering if there's an existing or planned feature in Pact-JVM that can achieve similar behavior. I.e (pseudocode)
Thank you
The text was updated successfully, but these errors were encountered: