I am trying to create a file from Android Junit in the internal storage using the MockContext and it throws UnsupportedOperationException.
MockContext mockContext = new MockContext();
FileOutputStream fos = mockContext.openFileOutput(LOG_FILE_NAME,
Context.MODE_PRIVATE);
Is there a standard way for testing file operations using Android JUNITs?
According to the API:
You have to extend MockContext and write the corresponding method implementation if you want to use that method.