Skip to content

Commit

Permalink
For zold-io#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

0 comments on commit e7bf162

Please sign in to comment.