[bisq-network/bisq] start testing the wallet services (#3326)

Christoph Sturm notifications at github.com
Tue Oct 1 08:30:05 UTC 2019

christophsturm commented on this pull request.

> +import bisq.core.user.Preferences;
+import bisq.core.util.ParsingUtils;
+import org.bitcoinj.core.Coin;
+import org.bitcoinj.params.UnitTestParams;
+import org.bitcoinj.utils.MonetaryFormat;
+import org.bitcoinj.wallet.Wallet;
+import org.junit.Test;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+public class BsqWalletServiceTest {
+    @Test(expected = InsufficientBsqException.class)
+    public void throwsExceptionWhenFundsAreInsufficient() throws TransactionVerificationException, WalletException, BsqChangeBelowDustException, InsufficientBsqException {

yes its not very readable, and its not a very useful test, the main motivation for this pr is to make the wallet service testable at all. 

All the test code is basically "given", the last line is "when", and the "then" is in the annotation at the top (we expect a exception).

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20191001/b20773af/attachment.html>

More information about the bisq-github mailing list