Skip to content

Commit

Permalink
Merge pull request #1974 from deepalik-neu/test-verifyEvidence-method
Browse files Browse the repository at this point in the history
ELY-2623:Add a new test methods testing that the verifyEvidence metho…
  • Loading branch information
Skyllarr authored Sep 25, 2023
2 parents fcd07fc + 0e09156 commit 8da9642
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,16 @@ public void testExistingIdentity3() throws Exception {
identity.dispose();
}

@Test
public void testVerifyEvidence() throws Exception {

RealmIdentity identity = realm.getRealmIdentity(new NamePrincipal("user1"));
Assert.assertTrue(identity.verifyEvidence(new PasswordGuessEvidence(pass1)));
Assert.assertFalse(identity.verifyEvidence(new PasswordGuessEvidence(pass2)));
Assert.assertFalse(identity.verifyEvidence(new PasswordGuessEvidence(pass3)));
identity.dispose();
}

@Test
public void testEvidence() throws Exception {
RealmIdentity identity = realm.getRealmIdentity(new SimpleEvidence("evidenceUser", true));
Expand Down

0 comments on commit 8da9642

Please sign in to comment.