mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-27 11:12:15 -05:00
fix unit tests
This commit is contained in:
parent
61dce088c2
commit
8da88f33bc
@ -156,7 +156,7 @@ public class CertifyOperationTest {
|
|||||||
CertifyActionsParcel actions = new CertifyActionsParcel(mStaticRing1.getMasterKeyId());
|
CertifyActionsParcel actions = new CertifyActionsParcel(mStaticRing1.getMasterKeyId());
|
||||||
actions.add(new CertifyAction(mStaticRing2.getMasterKeyId(),
|
actions.add(new CertifyAction(mStaticRing2.getMasterKeyId(),
|
||||||
mStaticRing2.getPublicKey().getUnorderedUserIds()));
|
mStaticRing2.getPublicKey().getUnorderedUserIds()));
|
||||||
CertifyResult result = op.execute(actions, new CryptoInputParcel(mKeyPhrase1), null);
|
CertifyResult result = op.execute(actions, new CryptoInputParcel(mKeyPhrase1));
|
||||||
|
|
||||||
Assert.assertTrue("certification must succeed", result.success());
|
Assert.assertTrue("certification must succeed", result.success());
|
||||||
|
|
||||||
@ -184,7 +184,7 @@ public class CertifyOperationTest {
|
|||||||
CertifyActionsParcel actions = new CertifyActionsParcel(mStaticRing1.getMasterKeyId());
|
CertifyActionsParcel actions = new CertifyActionsParcel(mStaticRing1.getMasterKeyId());
|
||||||
actions.add(new CertifyAction(mStaticRing2.getMasterKeyId(), null,
|
actions.add(new CertifyAction(mStaticRing2.getMasterKeyId(), null,
|
||||||
mStaticRing2.getPublicKey().getUnorderedUserAttributes()));
|
mStaticRing2.getPublicKey().getUnorderedUserAttributes()));
|
||||||
CertifyResult result = op.execute(actions, new CryptoInputParcel(mKeyPhrase1), null);
|
CertifyResult result = op.execute(actions, new CryptoInputParcel(mKeyPhrase1));
|
||||||
|
|
||||||
Assert.assertTrue("certification must succeed", result.success());
|
Assert.assertTrue("certification must succeed", result.success());
|
||||||
|
|
||||||
@ -207,7 +207,7 @@ public class CertifyOperationTest {
|
|||||||
actions.add(new CertifyAction(mStaticRing1.getMasterKeyId(),
|
actions.add(new CertifyAction(mStaticRing1.getMasterKeyId(),
|
||||||
mStaticRing2.getPublicKey().getUnorderedUserIds()));
|
mStaticRing2.getPublicKey().getUnorderedUserIds()));
|
||||||
|
|
||||||
CertifyResult result = op.execute(actions, new CryptoInputParcel(mKeyPhrase1), null);
|
CertifyResult result = op.execute(actions, new CryptoInputParcel(mKeyPhrase1));
|
||||||
|
|
||||||
Assert.assertFalse("certification with itself must fail!", result.success());
|
Assert.assertFalse("certification with itself must fail!", result.success());
|
||||||
Assert.assertTrue("error msg must be about self certification",
|
Assert.assertTrue("error msg must be about self certification",
|
||||||
@ -226,7 +226,7 @@ public class CertifyOperationTest {
|
|||||||
uids.add("nonexistent");
|
uids.add("nonexistent");
|
||||||
actions.add(new CertifyAction(1234L, uids));
|
actions.add(new CertifyAction(1234L, uids));
|
||||||
|
|
||||||
CertifyResult result = op.execute(actions, new CryptoInputParcel(mKeyPhrase1), null);
|
CertifyResult result = op.execute(actions, new CryptoInputParcel(mKeyPhrase1));
|
||||||
|
|
||||||
Assert.assertFalse("certification of nonexistent key must fail", result.success());
|
Assert.assertFalse("certification of nonexistent key must fail", result.success());
|
||||||
Assert.assertTrue("must contain error msg about not found",
|
Assert.assertTrue("must contain error msg about not found",
|
||||||
@ -238,7 +238,7 @@ public class CertifyOperationTest {
|
|||||||
actions.add(new CertifyAction(mStaticRing1.getMasterKeyId(),
|
actions.add(new CertifyAction(mStaticRing1.getMasterKeyId(),
|
||||||
mStaticRing2.getPublicKey().getUnorderedUserIds()));
|
mStaticRing2.getPublicKey().getUnorderedUserIds()));
|
||||||
|
|
||||||
CertifyResult result = op.execute(actions, new CryptoInputParcel(mKeyPhrase1), null);
|
CertifyResult result = op.execute(actions, new CryptoInputParcel(mKeyPhrase1));
|
||||||
|
|
||||||
Assert.assertFalse("certification of nonexistent key must fail", result.success());
|
Assert.assertFalse("certification of nonexistent key must fail", result.success());
|
||||||
Assert.assertTrue("must contain error msg about not found",
|
Assert.assertTrue("must contain error msg about not found",
|
||||||
|
Loading…
Reference in New Issue
Block a user