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:
parent
870af0e005
commit
1483ff9e24
1 changed files with 13 additions and 0 deletions
|
@ -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));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue