[bisq-network/bisq] Refactor fee estimation (#2251)
Manfred Karrer
notifications at github.com
Mon Jan 14 13:36:06 UTC 2019
ManfredKarrer commented on this pull request.
> + BtcWalletService btcWalletService = mock(BtcWalletService.class);
+ int result;
+ int realTxSize;
+ Coin txFee;
+
+ initialEstimatedTxSize = 260;
+ txFeePerByte = Coin.valueOf(10);
+ realTxSize = 260;
+
+ txFee = txFeePerByte.multiply(initialEstimatedTxSize);
+ when(btcWalletService.getEstimatedFeeTxSize(outputValues, txFee)).thenReturn(realTxSize);
+ result = TxFeeEstimationService.getEstimatedTxSize(outputValues, initialEstimatedTxSize, txFeePerByte, btcWalletService);
+ assertEquals(260, result);
+
+
+ // TODO check how to use the mocking framework for repeated calls
You refer to the commented out lines, right? Would you mind to have a hands on the test class? More your domain, you know my love for tests is limited ;-)
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/2251#discussion_r247492934
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20190114/490d0efd/attachment.html>
More information about the bisq-github
mailing list