mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 01:41:11 +01:00
remove jmockit
This commit is contained in:
parent
5da7ca21fa
commit
0babe82d09
15
build.gradle
15
build.gradle
@ -34,7 +34,6 @@ configure(subprojects) {
|
||||
bcVersion = '1.56'
|
||||
codecVersion = '1.9'
|
||||
easyVersion = '4.0.1'
|
||||
jmockitVersion = '1.42'
|
||||
joptVersion = '5.0.3'
|
||||
langVersion = '3.4'
|
||||
bitcoinjVersion = 'a88d36d'
|
||||
@ -211,9 +210,10 @@ configure(project(':p2p')) {
|
||||
compile 'org.fxmisc.easybind:easybind:1.0.3'
|
||||
compileOnly "org.projectlombok:lombok:$lombokVersion"
|
||||
annotationProcessor "org.projectlombok:lombok:$lombokVersion"
|
||||
testCompile 'org.jmockit:jmockit:1.30' // must not use current $jmockitVersion
|
||||
testCompileOnly "org.projectlombok:lombok:$lombokVersion"
|
||||
testAnnotationProcessor "org.projectlombok:lombok:$lombokVersion"
|
||||
testCompile("org.mockito:mockito-core:$mockitoVersion")
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -248,9 +248,7 @@ configure(project(':core')) {
|
||||
compileOnly "org.projectlombok:lombok:$lombokVersion"
|
||||
annotationProcessor "org.projectlombok:lombok:$lombokVersion"
|
||||
|
||||
testCompile "org.jmockit:jmockit:$jmockitVersion"
|
||||
testCompile("org.mockito:mockito-core:$mockitoVersion") {
|
||||
}
|
||||
testCompile("org.mockito:mockito-core:$mockitoVersion")
|
||||
testCompile "org.springframework:spring-test:$springVersion"
|
||||
testCompile "com.natpryce:make-it-easy:$easyVersion"
|
||||
testCompile group: 'org.hamcrest', name: 'hamcrest-all', version: '1.3'
|
||||
@ -260,9 +258,6 @@ configure(project(':core')) {
|
||||
|
||||
test {
|
||||
systemProperty 'jdk.attach.allowAttachSelf', true
|
||||
|
||||
def jmockit = configurations.testCompile.files.find { it.name.contains("jmockit") }.absolutePath
|
||||
jvmArgs "-javaagent:$jmockit"
|
||||
}
|
||||
}
|
||||
|
||||
@ -303,7 +298,6 @@ configure(project(':desktop')) {
|
||||
compileOnly "org.projectlombok:lombok:$lombokVersion"
|
||||
annotationProcessor "org.projectlombok:lombok:$lombokVersion"
|
||||
|
||||
testCompile "org.jmockit:jmockit:$jmockitVersion"
|
||||
testCompile("org.mockito:mockito-core:$mockitoVersion") {
|
||||
}
|
||||
testCompile "org.springframework:spring-test:$springVersion"
|
||||
@ -314,9 +308,6 @@ configure(project(':desktop')) {
|
||||
|
||||
test {
|
||||
systemProperty 'jdk.attach.allowAttachSelf', true
|
||||
|
||||
def jmockit = configurations.testCompile.files.find { it.name.contains("jmockit") }.absolutePath
|
||||
jvmArgs "-javaagent:$jmockit"
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -17,44 +17,10 @@
|
||||
|
||||
package bisq.core.dao.node.full;
|
||||
|
||||
import bisq.core.dao.node.parser.BlockParser;
|
||||
import bisq.core.dao.node.parser.TxParser;
|
||||
import bisq.core.dao.state.DaoStateService;
|
||||
import bisq.core.dao.state.model.blockchain.TxInput;
|
||||
import bisq.core.dao.state.model.blockchain.TxOutputKey;
|
||||
|
||||
import bisq.common.proto.persistable.PersistenceProtoResolver;
|
||||
|
||||
import org.bitcoinj.core.Coin;
|
||||
|
||||
import com.neemre.btcdcli4j.core.domain.RawBlock;
|
||||
import com.neemre.btcdcli4j.core.domain.RawTransaction;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
import mockit.Expectations;
|
||||
import mockit.Injectable;
|
||||
import mockit.Tested;
|
||||
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
import static java.util.Arrays.asList;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
|
||||
// not converting this test because it is already ignored.
|
||||
// Intro to jmockit can be found at http://jmockit.github.io/tutorial/Mocking.html
|
||||
@Ignore
|
||||
//@Ignore
|
||||
/*
|
||||
public class BlockParserTest {
|
||||
// @Tested classes are instantiated automatically when needed in a test case,
|
||||
// using injection where possible, see http://jmockit.github.io/tutorial/Mocking.html#tested
|
||||
@ -213,7 +179,7 @@ public class BlockParserTest {
|
||||
});
|
||||
*/
|
||||
|
||||
// Verify that the genesis tx has been added to the bsq blockchain with the correct issuance amount
|
||||
// Verify that the genesis tx has been added to the bsq blockchain with the correct issuance amount
|
||||
/* assertTrue(daoStateService.getGenesisTx().get() == genesisTx);
|
||||
assertTrue(daoStateService.getGenesisTotalSupply().getValue() == issuance.getValue());
|
||||
|
||||
@ -232,7 +198,8 @@ public class BlockParserTest {
|
||||
assertTrue(bsqOut2.getValue() == bsqTx1Value2);
|
||||
assertFalse(daoStateService.isTxOutputSpendable(genesisTxId, 0));
|
||||
assertTrue(daoStateService.isTxOutputSpendable(bsqTx1Id, 0));
|
||||
assertTrue(daoStateService.isTxOutputSpendable(bsqTx1Id, 1));*/
|
||||
assertTrue(daoStateService.isTxOutputSpendable(bsqTx1Id, 1));
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
@ -47,19 +47,11 @@ import java.io.IOException;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import mockit.Mocked;
|
||||
import mockit.integration.junit4.JMockit;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
@Slf4j
|
||||
@RunWith(JMockit.class)
|
||||
@Ignore("Use NetworkProtoResolver, PersistenceProtoResolver or ProtoResolver which are all in io.bisq.common.")
|
||||
import static org.mockito.Mockito.mock;
|
||||
|
||||
public class P2PDataStorageTest {
|
||||
private final Set<NodeAddress> seedNodes = new HashSet<>();
|
||||
private EncryptionService encryptionService1, encryptionService2;
|
||||
@ -70,14 +62,10 @@ public class P2PDataStorageTest {
|
||||
private File dir1;
|
||||
private File dir2;
|
||||
|
||||
@Mocked
|
||||
Broadcaster broadcaster;
|
||||
@Mocked
|
||||
NetworkNode networkNode;
|
||||
@Mocked
|
||||
NetworkProtoResolver networkProtoResolver;
|
||||
@Mocked
|
||||
PersistenceProtoResolver persistenceProtoResolver;
|
||||
Broadcaster broadcaster = mock(Broadcaster.class);
|
||||
NetworkNode networkNode = mock(NetworkNode.class);
|
||||
NetworkProtoResolver networkProtoResolver = mock(NetworkProtoResolver.class);
|
||||
PersistenceProtoResolver persistenceProtoResolver = mock(PersistenceProtoResolver.class);
|
||||
|
||||
@Before
|
||||
public void setup() throws InterruptedException, NoSuchAlgorithmException, CertificateException, KeyStoreException, IOException, CryptoException, SignatureException, InvalidKeyException {
|
||||
|
Loading…
Reference in New Issue
Block a user