Created
February 7, 2020 13:53
-
-
Save OleksandrKucherenko/0083f9ac2c85270e70fa58350317ff9f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
@Config(sdk = Build.VERSION_CODES.KITKAT) | |
public void testExtractFacebookConceal_NoHardware_api19() throws Exception { | |
// GIVEN: | |
// API19, minimal Android version | |
final ReactApplicationContext context = getRNContext(); | |
// WHEN: ask keychain for secured storage | |
final KeychainModule module = new KeychainModule(context); | |
final CipherStorage storage = module.getCipherStorageForCurrentAPILevel(); | |
// THEN: expected Facebook cipher storage, its the only one that supports API19 | |
assertThat(storage, notNullValue()); | |
assertThat(storage, instanceOf(CipherStorageFacebookConceal.class)); | |
assertThat(storage.isBiometrySupported(), is(false)); | |
assertThat(storage.securityLevel(), is(SecurityLevel.ANY)); | |
assertThat(storage.getMinSupportedApiLevel(), is(Build.VERSION_CODES.JELLY_BEAN)); | |
assertThat(storage.supportsSecureHardware(), is(false)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment