1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-11-10 14:35:59 +01:00

Add another test for Trustworthiness

This commit is contained in:
Paul Schaub 2022-05-12 16:25:04 +02:00
parent 870af0e005
commit 1483ff9e24

View file

@ -71,4 +71,17 @@ public class TrustworthinessTest {
it = new Trustworthiness(140, 1); it = new Trustworthiness(140, 1);
assertTrue(it.isFullyTrusted()); 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));
}
} }