Skip to content

Commit e7bf162

Browse files
committed
For #5: Tests for push.
1 parent 0e57800 commit e7bf162

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/test/java/io/zold/api/NetworkTest.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,26 @@ public void pushWalletToRightRemote() {
7575
).push(Mockito.any(Wallet.class));
7676
}
7777

78+
@Test
79+
public void pushWalletToAllRemotes() {
80+
final Remote highremote = Mockito.mock(Remote.class);
81+
final Remote lowremote = Mockito.mock(Remote.class);
82+
final Wallet wallet = Mockito.mock(Wallet.class);
83+
new RtNetwork(
84+
new IterableOf<Remote>(
85+
highremote, lowremote
86+
)
87+
).push(wallet);
88+
Mockito.verify(
89+
highremote,
90+
Mockito.times(1)
91+
).push(Mockito.any(Wallet.class));
92+
Mockito.verify(
93+
lowremote,
94+
Mockito.times(1)
95+
).push(Mockito.any(Wallet.class));
96+
}
97+
7898
@Test
7999
@Ignore
80100
public void filtersUnqualifiedRemotesFromPush() {

0 commit comments

Comments
 (0)