Skip to content

Commit

Permalink
For #5: Tests for push.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulodamaso committed Jul 19, 2018
1 parent 0e57800 commit e7bf162
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/test/java/io/zold/api/NetworkTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,26 @@ public void pushWalletToRightRemote() {
).push(Mockito.any(Wallet.class));
}

@Test
public void pushWalletToAllRemotes() {
final Remote highremote = Mockito.mock(Remote.class);
final Remote lowremote = Mockito.mock(Remote.class);
final Wallet wallet = Mockito.mock(Wallet.class);
new RtNetwork(
new IterableOf<Remote>(
highremote, lowremote
)
).push(wallet);
Mockito.verify(
highremote,
Mockito.times(1)
).push(Mockito.any(Wallet.class));
Mockito.verify(
lowremote,
Mockito.times(1)
).push(Mockito.any(Wallet.class));
}

@Test
@Ignore
public void filtersUnqualifiedRemotesFromPush() {
Expand Down

4 comments on commit e7bf162

@0pdd
Copy link
Collaborator

@0pdd 0pdd commented on e7bf162 Jul 19, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Puzzle 5-38f68f69 discovered in src/test/java/io/zold/api/NetworkTest.java and submitted as #38. Please, remember that the puzzle was not necessarily added in this particular commit. Maybe it was added earlier, but we discovered it only now.

@0pdd
Copy link
Collaborator

@0pdd 0pdd commented on e7bf162 Jul 19, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Puzzle 5-fd3c6d54 discovered in src/main/java/io/zold/api/RtNetwork.java and submitted as #39. Please, remember that the puzzle was not necessarily added in this particular commit. Maybe it was added earlier, but we discovered it only now.

@0pdd
Copy link
Collaborator

@0pdd 0pdd commented on e7bf162 Jul 19, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Puzzle 5-c56bb757 discovered in src/main/java/io/zold/api/RtNetwork.java and submitted as #40. Please, remember that the puzzle was not necessarily added in this particular commit. Maybe it was added earlier, but we discovered it only now.

@0pdd
Copy link
Collaborator

@0pdd 0pdd commented on e7bf162 Jul 19, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Puzzle 5-dec07794 discovered in src/main/java/io/zold/api/RtNetwork.java and submitted as #41. Please, remember that the puzzle was not necessarily added in this particular commit. Maybe it was added earlier, but we discovered it only now.

Please sign in to comment.