From cbab5c5c429de35af4a2cf44fd27c48f88bb497c Mon Sep 17 00:00:00 2001 From: semux Date: Fri, 19 Jul 2019 23:44:10 +0100 Subject: [PATCH] Tests: remove the SetupCoinbaseOnEmptyWallet test --- src/main/java/org/semux/core/Wallet.java | 1 - src/test/java/org/semux/gui/SemuxGuiTest.java | 14 -------------- 2 files changed, 15 deletions(-) diff --git a/src/main/java/org/semux/core/Wallet.java b/src/main/java/org/semux/core/Wallet.java index 970d4a6e8..e2206c50f 100644 --- a/src/main/java/org/semux/core/Wallet.java +++ b/src/main/java/org/semux/core/Wallet.java @@ -293,7 +293,6 @@ protected void readHdSeed(byte[] key, SimpleDecoder dec) { byte[] hdSeedEncrypted = dec.readBytes(); byte[] hdSeedRaw = Aes.decrypt(hdSeedEncrypted, key, iv); - Map map = new HashMap<>(); SimpleDecoder d = new SimpleDecoder(hdSeedRaw); mnemonicPhrase = d.readString(); nextAccountIndex = d.readInt(); diff --git a/src/test/java/org/semux/gui/SemuxGuiTest.java b/src/test/java/org/semux/gui/SemuxGuiTest.java index 7c182ae95..0d82eaf50 100644 --- a/src/test/java/org/semux/gui/SemuxGuiTest.java +++ b/src/test/java/org/semux/gui/SemuxGuiTest.java @@ -82,20 +82,6 @@ public void testSetupCoinbase() throws ParseException { assertThat(gui.setupCoinbase(wallet)).isEqualTo(3); } - @Test - public void testSetupCoinbaseEmpty() throws ParseException { - Wallet wallet = kernelRule.getKernel().getWallet(); - wallet.setAccounts(Collections.emptyList()); - - // setup coinbase - SemuxGui gui = spy(new SemuxGui(new WalletModel(kernelRule.getKernel().getConfig()), kernelRule.getKernel())); - Mockito.doNothing().when(gui).startKernel(any(), any(), any()); - gui.setupCoinbase(wallet); - - // verify - assertThat(wallet.size()).isEqualTo(1); - } - @Test public void testProcessBlock() { KernelMock kernel = kernelRule.getKernel();