Add another test for Trustworthiness

This commit is contained in:
Paul Schaub 2022-05-12 16:25:04 +02:00
parent 870af0e005
commit 1483ff9e24
1 changed files with 13 additions and 0 deletions

View File

@ -71,4 +71,17 @@ public class TrustworthinessTest {
it = new Trustworthiness(140, 1);
assertTrue(it.isFullyTrusted());
}
@Test
public void depthHierarchyTest() {
Trustworthiness l1 = Trustworthiness.fullyTrusted().metaIntroducerOfDepth(1);
Trustworthiness l2 = Trustworthiness.fullyTrusted().metaIntroducerOfDepth(2);
Trustworthiness l3 = Trustworthiness.fullyTrusted().metaIntroducerOfDepth(3);
assertTrue(l3.canIntroduce(l2));
assertTrue(l3.canIntroduce(l1));
assertTrue(l2.canIntroduce(l1));
assertFalse(l1.canIntroduce(l2));
assertFalse(l1.canIntroduce(l3));
}
}