summaryrefslogtreecommitdiff
path: root/platform/platform-tests/testSrc/com/intellij/ide/passwordSafe/impl/providers/masterKey/MasterKeyPasswordSafeTest.java
diff options
context:
space:
mode:
authorTor Norbye <tnorbye@google.com>2014-08-20 17:28:18 -0700
committerTor Norbye <tnorbye@google.com>2014-08-20 17:28:18 -0700
commitd76e3920c56d37c942092b7dca20fcaded81c0a5 (patch)
tree80a55c7b59c38377216daaada4e8bc47b69ceb9a /platform/platform-tests/testSrc/com/intellij/ide/passwordSafe/impl/providers/masterKey/MasterKeyPasswordSafeTest.java
parent3b37877a2561bf9fbe072253a18688807d523505 (diff)
parent1aa2e09bdbd413eacb677e9fa4b50630530d0656 (diff)
downloadidea-d76e3920c56d37c942092b7dca20fcaded81c0a5.tar.gz
Merge remote-tracking branch 'aosp/upstream-master' into merge
Conflicts: .idea/modules.xml platform/platform-impl/src/com/intellij/openapi/updateSettings/impl/UpdatesXmlLoader.java Change-Id: Id899dae9a1e1c79272f8a70e14a7dcef4f760d7f
Diffstat (limited to 'platform/platform-tests/testSrc/com/intellij/ide/passwordSafe/impl/providers/masterKey/MasterKeyPasswordSafeTest.java')
-rw-r--r--platform/platform-tests/testSrc/com/intellij/ide/passwordSafe/impl/providers/masterKey/MasterKeyPasswordSafeTest.java19
1 files changed, 2 insertions, 17 deletions
diff --git a/platform/platform-tests/testSrc/com/intellij/ide/passwordSafe/impl/providers/masterKey/MasterKeyPasswordSafeTest.java b/platform/platform-tests/testSrc/com/intellij/ide/passwordSafe/impl/providers/masterKey/MasterKeyPasswordSafeTest.java
index 0e2355f5c3c1..a84497a8f083 100644
--- a/platform/platform-tests/testSrc/com/intellij/ide/passwordSafe/impl/providers/masterKey/MasterKeyPasswordSafeTest.java
+++ b/platform/platform-tests/testSrc/com/intellij/ide/passwordSafe/impl/providers/masterKey/MasterKeyPasswordSafeTest.java
@@ -28,13 +28,13 @@ public class MasterKeyPasswordSafeTest {
@Test
public void testMasterKey() throws PasswordSafeException {
PasswordDatabase db = new PasswordDatabase();
- MasterKeyPasswordSafe s1 = testProvider(db);
+ MasterKeyPasswordSafe s1 = new MasterKeyPasswordSafe(db);
s1.resetMasterPassword("pass1", false);
s1.storePassword(null, MasterKeyPasswordSafeTest.class, "TEST", "test");
assertEquals("test", s1.getPassword(null, MasterKeyPasswordSafeTest.class, "TEST"));
assertTrue(s1.changeMasterPassword("pass1", "pass2", false));
assertEquals("test", s1.getPassword(null, MasterKeyPasswordSafeTest.class, "TEST"));
- MasterKeyPasswordSafe s2 = testProvider(db);
+ MasterKeyPasswordSafe s2 = new MasterKeyPasswordSafe(db);
assertFalse(s2.setMasterPassword("pass1"));
assertTrue(s2.setMasterPassword("pass2"));
assertEquals("test", s2.getPassword(null, MasterKeyPasswordSafeTest.class, "TEST"));
@@ -45,19 +45,4 @@ public class MasterKeyPasswordSafeTest {
s2.resetMasterPassword("fail", false);
assertNull(s2.getPassword(null, MasterKeyPasswordSafeTest.class, "TEST"));
}
-
- /**
- * Get test instance of the provider
- * @param db the database to use
- * @return a instance of the provider
- */
- private static MasterKeyPasswordSafe testProvider(final PasswordDatabase db) {
- return new MasterKeyPasswordSafe(db) {
- @Override
- protected boolean isTestMode() {
- return true;
- }
- };
- }
-
}