mockStatic (Utils.class) //3. 靜態方法的目標class ... } } 要使用PowerMock來測試靜態方法時比較麻煩,需設定. 1. @RunWith. @PrepareForTest; mockStatic() ...
確定! 回上一頁