[Bug]: Unable to pass Mocked context to Braze.getInstance(context: Context) while writing unit test case. Showing, "Braze cannot be returned by getApplicationContext" #241
Write some unit test case related to braze that internally requires call to Braze.getInstance(context).
Mock the call Braze.getInstance(context) with the mocked context.
Expected Behavior
When passing mocked context to Braze.getInstance(mockedContext) , It should work correct and return a Braze instance.
Actual Incorrect Behavior
While Passing mocked context, It is showing an error : "Braze cannot be returned by getApplicationContext()"
Braze Android SDK Version
23.1.1
Steps To Reproduce
Write some unit test case related to braze that internally requires call to Braze.getInstance(context). Mock the call Braze.getInstance(context) with the mocked context.
Expected Behavior
When passing mocked context to Braze.getInstance(mockedContext) , It should work correct and return a Braze instance.
Actual Incorrect Behavior
While Passing mocked context, It is showing an error : "Braze cannot be returned by getApplicationContext()"
Verbose Logs
No response
Additional Information
No response