Skip to content

Instantly share code, notes, and snippets.

@OleksandrKucherenko
Created February 7, 2020 13:14
Show Gist options
  • Save OleksandrKucherenko/7f8352df99350e8dfb40734c8ccb1f52 to your computer and use it in GitHub Desktop.
Save OleksandrKucherenko/7f8352df99350e8dfb40734c8ccb1f52 to your computer and use it in GitHub Desktop.
// https://gist.github.com/OleksandrKucherenko/34b5c72445bcf9d5519af6898afcb8fb#file-keychainmoduletests-java-L87-L92
@RunWith(RobolectricTestRunner.class)
public class KeychainModuleTests {
/**
* Security fake provider.
*/
private FakeProvider provider = new FakeProvider();
@Before
public void setUp() throws Exception {
provider.configuration.clear();
Security.insertProviderAt(provider, 0);
}
@After
public void tearDown() throws Exception {
Security.removeProvider(FakeProvider.NAME);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment