Questions tagged «mockwebserver»

11
方形改装服务器模拟测试
什么是嘲笑使用时,测试服务器的最好办法广场改造框架。 可能的方式: 创建一个新的改装客户端,并在RestAdapter.Builder()。setClient()中进行设置。这涉及解析Request对象并返回json作为Response对象。 将此带注释的接口实现为模拟类,并使用它代替RestAdapter.create()提供的版本(不会测试gson序列化) ? 理想情况下,我想让模拟服务器提供json响应,以便我可以同时测试gson序列化。 任何例子将不胜感激。
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.