Skip to content

Commit

Permalink
(Hopefully) fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianVennen committed Sep 23, 2024
1 parent 0281457 commit d018299
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/test/java/CreditPoolsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ private void checkTestPool(CreditPool pool) {
Assertions.assertNotNull(pool);
Assertions.assertEquals(TEST_POOL_ID, pool.getId());
Assertions.assertEquals("eAPI tests", pool.getName());
Assertions.assertEquals(100, pool.getCredits());
Assertions.assertEquals(100, pool.getOwnCredits());
double poolCredits = pool.getCredits();
Assertions.assertTrue(poolCredits > 100, "Expected pool to have more than 100 credits, got " + poolCredits);
Assertions.assertEquals(poolCredits, pool.getOwnCredits());
Assertions.assertEquals(2, pool.getMembers());
Assertions.assertEquals(1, pool.getServers());
}
Expand All @@ -48,7 +49,7 @@ public void testGetPoolMembers() throws APIException {
Assertions.assertTrue(owner.isPresent());
Assertions.assertNotNull(owner.get().getAccount());
Assertions.assertTrue(owner.get().isOwner());
Assertions.assertEquals(100, owner.get().getCredits());
Assertions.assertTrue(owner.get().getCredits() > 100, "Expected owner to have more than 100 credits, got " + owner.get().getCredits());
Assertions.assertEquals(1, owner.get().getShare());

Optional<CreditPoolMember> other = Arrays.stream(members).filter(member -> !member.isOwner()).findFirst();
Expand Down

0 comments on commit d018299

Please sign in to comment.