![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
单元测试
路路在路上
这个作者很懒,什么都没留下…
展开
-
Robolectric之Shadows
官网介绍地址:点这里本文根据自己平时的使用对官网文档的一种理解和翻译shadows出现的原因Robolectric虽然创建了一个包含了真实的Android框架代码的运行时环境,但是还是有一些限制:Native code - Android native code cannot execute on your development machine. (Android本地代码不能在我们的开发计算机上执行)Out of process calls - There are no Android sys原创 2020-06-11 12:00:24 · 1961 阅读 · 0 评论 -
Robolectric常用方法
标题1.Robolectric官网第一个例子1)页面<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> <Button原创 2020-06-01 18:39:12 · 924 阅读 · 0 评论 -
org.mockito.exceptions.misusing.InvalidUseOfMatchersException: Invalid use of argument matchers!
在写Android 单元测试的mock时,一直报这个错误org.mockito.exceptions.misusing.InvalidUseOfMatchersException: Invalid use of argument matchers!8 matchers expected, 7 recorded:-> at......This exception may occur if matchers are combined with raw values: //incorre原创 2020-05-27 14:46:44 · 4716 阅读 · 1 评论