Skip to content

Instantly share code, notes, and snippets.

@voghDev
Created June 27, 2018 07:56
Show Gist options
  • Save voghDev/b1ab014829597e965b70c43487caf1c1 to your computer and use it in GitHub Desktop.
Save voghDev/b1ab014829597e965b70c43487caf1c1 to your computer and use it in GitHub Desktop.
Workaround to pass any second parameter to getString(int resId, String... params) method
when(mockContext.getString(eq(R.string.string_with_param), any(String.class))).thenReturn("Return value");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment