Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
下面的对象在调试时显示为{}而不是{"types" : ["Ice Cream"] }预期的那样。为什么会这样。
{}
{"types" : ["Ice Cream"] }
PactDslJsonObject resquest = new PactDslJsonObject() .array("type").stringMatcher("\w+","Ice Cream");
很抱歉回答我自己的问题。看起来我们必须关闭子PactDslJsonObject对象或其他任何东西(在这种情况下也可能是一个数组,在这种情况下您将不得不关闭该数组的对象。)是我们想从 aor 请求或响应服务吗?
PactDslJsonObject
所以,在这种情况下,它应该是,
DslPart response = new PactDslJsonObject() .array("type").stringMatcher("\w+","Ice Cream").closeArray();