Skip to content

Commit 07751e6

Browse files
committed
Mock out the getExchangeRate method call
1 parent 8e7f2f6 commit 07751e6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/test/java/org/whispersystems/bithub/tests/controllers/GithubControllerTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
public class GithubControllerTest extends ResourceTest {
4343

4444
private static final BigDecimal BALANCE = new BigDecimal(10.01);
45+
private static final BigDecimal EXCHANGE_RATE = new BigDecimal(1.0);
4546

4647
private final CoinbaseClient coinbaseClient = mock(CoinbaseClient.class);
4748
private final GithubClient githubClient = mock(GithubClient.class);
@@ -53,6 +54,7 @@ public class GithubControllerTest extends ResourceTest {
5354
@Override
5455
protected void setUpResources() throws Exception {
5556
when(coinbaseClient.getAccountBalance()).thenReturn(BALANCE);
57+
when(coinbaseClient.getExchangeRate()).thenReturn(EXCHANGE_RATE);
5658
addResource(new GithubController(repositories, githubClient, coinbaseClient, new BigDecimal(0.02)));
5759
addProvider(new UnauthorizedHookExceptionMapper());
5860
}

0 commit comments

Comments
 (0)