Android单元测试研究与实践(23)
if(uri.getPath().equals( /path/of/interest )){ responseString= 返回的json1 ;//这里是设置返回值 } else { responseString= 返回的json2 ;
if(uri.getPath().equals("/path/of/interest")) {
responseString = "返回的json1";//这里是设置返回值
} else {
responseString = "返回的json2";
原文转自:http://tech.meituan.com/Android_unit_test.html