Android单元测试研究与实践(24)

发表于:2017-02-21来源:meituan作者:潘铭炜 黄超点击数: 标签:单元测试Android
} return newResponse(request.getUrl(),200, nothing ,Collections.EMPTY_LIST,newTypedByteArray( application/json ,responseString.getBytes())); } } //MockClient使用方式如下:
  •  
  • return new Response(request.getUrl(), 200, "nothing", Collections.EMPTY_LIST, new TypedByteArray("application/json",responseString.getBytes())); 
  •  
  •  
  •  
  • //MockClient使用方式如下: 
  •  

    原文转自:http://tech.meituan.com/Android_unit_test.html