Browse Source

half fixed androidTest, regarding trust/misstrust. Misstrust still cannot be undone

JNI-44
Edouard Tisserant 9 years ago
parent
commit
542c1356b7
  1. 20
      androidTests/app/src/main/java/com/pep/k9/MainActivity.java

20
androidTests/app/src/main/java/com/pep/k9/MainActivity.java

@ -445,23 +445,39 @@ public class MainActivity extends AppCompatActivity {
if(!(aclr.equals(Color.pEpRatingReliable))) throw new AssertionError(); if(!(aclr.equals(Color.pEpRatingReliable))) throw new AssertionError();
e.trustPersonalKey(bob); e.trustPersonalKey(bob);
/* to = new Vector<Identity>();
to.add(bob);
msg.setTo(to);
Color bclr = e.outgoing_message_color(msg); Color bclr = e.outgoing_message_color(msg);
if(!(bclr.equals(Color.pEpRatingTrusted))) throw new AssertionError(); if(!(bclr.equals(Color.pEpRatingTrusted))) throw new AssertionError();
e.keyResetTrust(bob); e.keyResetTrust(bob);
e.updateIdentity(bob);
to = new Vector<Identity>();
to.add(bob);
msg.setTo(to);
Color cclr = e.outgoing_message_color(msg); Color cclr = e.outgoing_message_color(msg);
if(!(cclr.equals(Color.pEpRatingReliable))) throw new AssertionError(); if(!(cclr.equals(Color.pEpRatingReliable))) throw new AssertionError();
/*
e.keyCompromized(bob); e.keyCompromized(bob);
e.updateIdentity(bob);
to = new Vector<Identity>();
to.add(bob);
msg.setTo(to);
Color dclr = e.outgoing_message_color(msg); Color dclr = e.outgoing_message_color(msg);
if(!(dclr.equals(Color.pEpRatingUnencrypted))) throw new AssertionError(); if(!(dclr.equals(Color.pEpRatingUnencrypted))) throw new AssertionError();
FIXME : keyResetTrust do not reset
e.keyResetTrust(bob); e.keyResetTrust(bob);
e.updateIdentity(bob);
to = new Vector<Identity>();
to.add(bob);
msg.setTo(to);
Color oclr = e.outgoing_message_color(msg); Color oclr = e.outgoing_message_color(msg);
if(!(oclr.equals(Color.pEpRatingReliable))) throw new AssertionError(); if(!(oclr.equals(Color.pEpRatingReliable))) throw new AssertionError();
*/ */
Vector<Identity> cc = new Vector<Identity>(); Vector<Identity> cc = new Vector<Identity>();
cc.add(alice); cc.add(alice);
msg.setCc(cc); msg.setCc(cc);

Loading…
Cancel
Save