我想用JUnit和EasyMock对我的班级进行单元测试。它扩展了android.location.Location。但是我总是得到Stub!异常,因为大多数的Android方法在JVM运行时是不可用的。super(l); return true;}
我尝试过使用Powermock模拟构造函数调用at an
(name == null) { }} 下面是我的testClassQ1:为什么会出现异常:String name = service02.test02("abc"); java.lang.RuntimeException: name is illegal Q2:当我调用Service02时,如何模拟Service01?--编辑 使用