我的项目中有以下课程:
public class SmsManager {
static final Uri message = Uri.parse("content://sms/");
ContentResolver resolver;
public SmsManager(ContentResolver resolver) {
this.resolver = resolver;
}
...
}
Class将负责对sms消息的操作(如Uri消息所示)。我怎样才能为它编写单元测试?如何轻松存根ContentResolver?