
如题, 现在的项目使用了 mobicents 的 Sip 协议 Java 实现,需要进行单元测试。但是怎么 mock 一个请求对象呢,使用 jMOckit 搞不出来。mobisents 提供了一个依赖:
http://www.mobicents.org/mss/ssf/sf-api/site/en/mock-test.html
<dependency> <groupId>org.mobicents.ssf</groupId> <artifactId>sf-mock</artifactId> <version>1.0.0-SNAPSHOT</version> <scope>test</scope> <optional>false</optional> </dependency> 但是 Maven 仓库中找不到这个 jar 了,有谁搞过这个或者有办法搞到 jar ?
1 hqtc OP 算了,玛德我自己搞一个! ``` public class HqSipRequest implements SipServletRequest ``` |
2 6IbA2bj5ip3tK49j Oct 6, 2017 应该要把 snapshot 去掉吧。 或者添加一下仓库。一般 snapshot 都不在主仓库里。 |
3 6IbA2bj5ip3tK49j Oct 6, 2017 查了一下。 http://www.mobicents.org/community.html 点 Forums 进去就会发现 ``` Mobicents was rebranded to RestComm. Read more at http://www.telestax.com/restcommdeveloper-mobicents/. As such there is a new Google Group at http://www.telestax.com/restcomm-developer-mobicents/ or you can also use http://stackoverflow.com/questions/tagged/restcomm ``` 所以 lz 的这些资料应该是很久以前的了。 可以去 https://github.com/RestComm/sip-servlets 看看新的。 |