![](/img/trans.png)
[英]How to Invoke Multiple webmethod URLs with different filename at once in spring boot
[英]Spring boot test @WebMethod
我有一個SOAP服務。 像這樣:
@WebMethod
public SomeResourceResponse getSomeThings(
@XmlElement(required = true)
@WebParam(name = "id") Long id) {
SomeResourceResponse resource = new SomeResourceResponse();
...
return resource;
}
如何進行單元測試? 我該如何嘲笑它? 我不明白。 所有現有的Spring教程(例如本教程-https: //spring.io/guides/gs/production-web-service/ )都建議直接使用SOAP UI。
只需調用該方法。
@Test
public void testGetSomeThings() {
...
SomeResourceResponse result = someResourceResponse.getSomeThings(1);
...
assertEquals(xxx, result);
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.