0
我試圖存根交互(Groovy代碼)異常在matchingJsonPath與wiremock
stubInteraction(
post(urlEqualTo("/someUrl"))
.withRequestBody(matchingJsonPath("\$.firstName"))
aResponse()
.withBody("")
.withStatus(200)
我收到異常
Problem accessing /someUrl. Reason:
com.jayway.jsonpath.JsonPath.read(Ljava/lang/String;Ljava/lang/String;[Lcom/jayway/jsonpath/Filter;)Ljava/lang/Object;</pre></p><h3>Caused by:</h3><pre>java.lang.NoSuchMethodError: com.jayway.jsonpath.JsonPath.read(Ljava/lang/String;Ljava/lang/String;[Lcom/jayway/jsonpath/Filter;)Ljava/lang/Object;
at com.github.tomakehurst.wiremock.matching.ValuePattern.isJsonPathMatch(ValuePattern.java:194)
對JSON:
{"firstName":"Jan"}
我在做什麼錯誤?
謝謝,我會努力 – MariuszS 2014-11-25 09:57:05
單機版包括老班'javax.servlet.http.HttpServletRequest'沒有'isAsyncStarted',所以我仍然有問題。 – MariuszS 2014-11-25 11:51:32