Accessing application context from TestSuite in Setup() before calling getActivity()

前端 未结 6 909
太阳男子
太阳男子 2020-12-08 09:42

I have an Activity that pulls an object from an Application extended class (application context) from within the OnCreate() method.

6条回答
  •  抹茶落季
    2020-12-08 10:20

    In kotlin val context = InstrumentationRegistry.getInstrumentation().context worked for me.

提交回复
热议问题