Browse Source

Updated rating defs, fixed trust/missTrust/resetTrust tests

JNI-44
Edouard Tisserant 9 years ago
parent
commit
2c84e835c9
  1. 21
      androidTests/app/src/main/java/com/pep/k9/MainActivity.java
  2. 15
      src/pEp.yml2

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

@ -441,43 +441,26 @@ public class MainActivity extends AppCompatActivity {
msg.setLongmsg("this is a test");
msg.setDir(Message.Direction.Outgoing);
Color aclr = e.outgoing_message_color(msg);
if(!(aclr.equals(Color.pEpRatingReliable))) throw new AssertionError();
e.trustPersonalKey(bob);
to = new Vector<Identity>();
to.add(bob);
msg.setTo(to);
Color bclr = e.outgoing_message_color(msg);
if(!(bclr.equals(Color.pEpRatingTrusted))) throw new AssertionError();
e.keyResetTrust(bob);
e.updateIdentity(bob);
to = new Vector<Identity>();
to.add(bob);
msg.setTo(to);
Color cclr = e.outgoing_message_color(msg);
if(!(cclr.equals(Color.pEpRatingReliable))) throw new AssertionError();
/*
e.keyCompromized(bob);
e.updateIdentity(bob);
to = new Vector<Identity>();
to.add(bob);
msg.setTo(to);
Color dclr = e.outgoing_message_color(msg);
if(!(dclr.equals(Color.pEpRatingUnencrypted))) throw new AssertionError();
FIXME : keyResetTrust do not reset
e.keyResetTrust(bob);
e.updateIdentity(bob);
to = new Vector<Identity>();
to.add(bob);
msg.setTo(to);
Color oclr = e.outgoing_message_color(msg);
if(!(oclr.equals(Color.pEpRatingReliable))) throw new AssertionError();
*/
Vector<Identity> cc = new Vector<Identity>();
cc.add(alice);
msg.setCc(cc);

15
src/pEp.yml2

@ -56,13 +56,14 @@ namespace pEp {
pEp_rating_cannot_decrypt > 1
pEp_rating_have_no_key > 2
pEp_rating_unencrypted > 3
pEp_rating_unreliable > 4
pEp_rating_reliable > 5
pEp_rating_yellow > 5
pEp_rating_trusted > 6
pEp_rating_green > 6
pEp_rating_trusted_and_anonymized > 7
pEp_rating_fully_anonymous > 8
pEp_rating_unencrypted_for_some > 4
pEp_rating_unreliable > 5
pEp_rating_reliable > 6
pEp_rating_yellow > 6
pEp_rating_trusted > 7
pEp_rating_green > 7
pEp_rating_trusted_and_anonymized > 8
pEp_rating_fully_anonymous > 9
pEp_rating_mistrust > -1
pEp_rating_red > -1

Loading…
Cancel
Save