mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-07-24 23:46:00 -04:00
Removing star and unused imports with checkstyle
This commit is contained in:
parent
ce05710537
commit
3b8f19c4ce
1206 changed files with 5197 additions and 6620 deletions
|
@ -18,37 +18,38 @@
|
|||
package haveno.core.account.sign;
|
||||
|
||||
|
||||
import org.bitcoinj.core.ECKey;
|
||||
|
||||
import com.google.common.base.Charsets;
|
||||
import haveno.common.crypto.CryptoException;
|
||||
import haveno.common.crypto.KeyRing;
|
||||
import haveno.common.crypto.Sig;
|
||||
import haveno.common.util.Utilities;
|
||||
import haveno.core.account.sign.SignedWitness;
|
||||
import haveno.core.account.sign.SignedWitnessService;
|
||||
import haveno.core.account.witness.AccountAgeWitness;
|
||||
import haveno.core.filter.FilterManager;
|
||||
import haveno.core.support.dispute.arbitration.arbitrator.ArbitratorManager;
|
||||
import haveno.network.p2p.P2PService;
|
||||
import haveno.network.p2p.storage.payload.PersistableNetworkPayload;
|
||||
import haveno.network.p2p.storage.persistence.AppendOnlyDataStoreService;
|
||||
import java.math.BigInteger;
|
||||
import java.security.KeyPair;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import org.bitcoinj.core.ECKey;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.security.KeyPair;
|
||||
import java.time.Instant;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.Date;
|
||||
|
||||
import static haveno.core.account.sign.SignedWitness.VerificationMethod.ARBITRATOR;
|
||||
import static haveno.core.account.sign.SignedWitness.VerificationMethod.TRADE;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.mockito.Mockito.*;
|
||||
import static org.mockito.Mockito.any;
|
||||
import static org.mockito.Mockito.anyBoolean;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.never;
|
||||
import static org.mockito.Mockito.times;
|
||||
import static org.mockito.Mockito.verify;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
public class SignedWitnessServiceTest {
|
||||
private SignedWitnessService signedWitnessService;
|
||||
|
|
|
@ -1,17 +1,15 @@
|
|||
package haveno.core.account.sign;
|
||||
|
||||
import org.bitcoinj.core.ECKey;
|
||||
import org.bitcoinj.core.Utils;
|
||||
|
||||
import com.google.common.base.Charsets;
|
||||
import haveno.common.crypto.Sig;
|
||||
import haveno.common.util.Utilities;
|
||||
import haveno.core.account.sign.SignedWitness;
|
||||
import java.time.Instant;
|
||||
|
||||
import org.bitcoinj.core.ECKey;
|
||||
import org.bitcoinj.core.Utils;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
import static haveno.core.account.sign.SignedWitness.VerificationMethod.ARBITRATOR;
|
||||
import static haveno.core.account.sign.SignedWitness.VerificationMethod.TRADE;
|
||||
import static org.junit.Assert.assertArrayEquals;
|
||||
|
|
|
@ -26,8 +26,6 @@ import haveno.common.crypto.Sig;
|
|||
import haveno.common.util.Utilities;
|
||||
import haveno.core.account.sign.SignedWitness;
|
||||
import haveno.core.account.sign.SignedWitnessService;
|
||||
import haveno.core.account.witness.AccountAgeWitness;
|
||||
import haveno.core.account.witness.AccountAgeWitnessService;
|
||||
import haveno.core.filter.FilterManager;
|
||||
import haveno.core.locale.CountryUtil;
|
||||
import haveno.core.offer.OfferPayload;
|
||||
|
@ -45,12 +43,15 @@ import haveno.core.trade.HavenoUtils;
|
|||
import haveno.network.p2p.P2PService;
|
||||
import haveno.network.p2p.storage.persistence.AppendOnlyDataStoreService;
|
||||
import org.bitcoinj.core.ECKey;
|
||||
|
||||
import java.security.KeyPair;
|
||||
import java.security.PublicKey;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.security.KeyPair;
|
||||
import java.security.PublicKey;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
|
@ -58,11 +59,6 @@ import java.util.GregorianCalendar;
|
|||
import java.util.List;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
import static haveno.core.payment.payload.PaymentMethod.getPaymentMethod;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
|
|
|
@ -17,25 +17,21 @@
|
|||
|
||||
package haveno.core.app;
|
||||
|
||||
import haveno.common.config.HavenoHelpFormatter;
|
||||
import joptsimple.OptionParser;
|
||||
|
||||
import java.net.URISyntaxException;
|
||||
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintStream;
|
||||
|
||||
import org.junit.Test;
|
||||
import java.net.URISyntaxException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.equalTo;
|
||||
import static org.junit.Assert.assertThat;
|
||||
|
||||
import haveno.common.config.HavenoHelpFormatter;
|
||||
|
||||
public class HavenoHelpFormatterTest {
|
||||
|
||||
@Test
|
||||
|
|
|
@ -22,10 +22,10 @@ import haveno.core.support.dispute.arbitration.arbitrator.ArbitratorManager;
|
|||
import haveno.core.support.dispute.arbitration.arbitrator.ArbitratorService;
|
||||
import haveno.core.user.User;
|
||||
import haveno.network.p2p.NodeAddress;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.not;
|
||||
import static org.hamcrest.collection.IsIterableContainingInAnyOrder.containsInAnyOrder;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
|
|
|
@ -22,11 +22,10 @@ import haveno.common.crypto.PubKeyRing;
|
|||
import haveno.core.support.dispute.arbitration.arbitrator.Arbitrator;
|
||||
import haveno.network.p2p.NodeAddress;
|
||||
import org.apache.commons.lang3.RandomUtils;
|
||||
import org.junit.Ignore;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import org.junit.Ignore;
|
||||
|
||||
@SuppressWarnings({"SameParameterValue", "UnusedAssignment"})
|
||||
public class ArbitratorTest {
|
||||
|
||||
|
|
|
@ -17,15 +17,15 @@
|
|||
|
||||
package haveno.core.arbitration;
|
||||
|
||||
import static haveno.core.arbitration.ArbitratorTest.getBytes;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import haveno.common.crypto.PubKeyRing;
|
||||
import haveno.core.support.dispute.mediation.mediator.Mediator;
|
||||
import haveno.network.p2p.NodeAddress;
|
||||
import org.junit.Ignore;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import org.junit.Ignore;
|
||||
import static haveno.core.arbitration.ArbitratorTest.getBytes;
|
||||
|
||||
public class MediatorTest {
|
||||
|
||||
|
|
|
@ -1,18 +1,17 @@
|
|||
package haveno.core.arbitration;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.security.PublicKey;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotEquals;
|
||||
import static org.mockito.Mockito.mock;
|
||||
|
||||
import haveno.core.account.witness.AccountAgeWitness;
|
||||
import haveno.core.payment.payload.PaymentAccountPayload;
|
||||
import haveno.core.support.dispute.arbitration.TraderDataItem;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.security.PublicKey;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotEquals;
|
||||
import static org.mockito.Mockito.mock;
|
||||
|
||||
/*
|
||||
* This file is part of Haveno.
|
||||
|
|
|
@ -17,21 +17,20 @@
|
|||
|
||||
package haveno.core.crypto;
|
||||
|
||||
import java.security.KeyStoreException;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.security.cert.CertificateException;
|
||||
import haveno.common.crypto.CryptoException;
|
||||
import haveno.common.crypto.KeyRing;
|
||||
import haveno.common.crypto.KeyStorage;
|
||||
import haveno.common.file.FileUtil;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.security.KeyStoreException;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.security.cert.CertificateException;
|
||||
|
||||
public class EncryptionTest {
|
||||
private static final Logger log = LoggerFactory.getLogger(EncryptionTest.class);
|
||||
|
|
|
@ -17,25 +17,22 @@
|
|||
|
||||
package haveno.core.crypto;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import haveno.common.crypto.CryptoException;
|
||||
import haveno.common.crypto.KeyRing;
|
||||
import haveno.common.crypto.KeyStorage;
|
||||
import haveno.common.crypto.Sig;
|
||||
import haveno.common.file.FileUtil;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Random;
|
||||
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
public class SigTest {
|
||||
private static final Logger log = LoggerFactory.getLogger(SigTest.class);
|
||||
|
|
|
@ -1,18 +1,14 @@
|
|||
package haveno.core.locale;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import static junit.framework.TestCase.assertTrue;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
|
||||
import haveno.core.locale.BankUtil;
|
||||
import haveno.core.locale.GlobalSettings;
|
||||
import haveno.core.locale.Res;
|
||||
|
||||
public class BankUtilTest {
|
||||
|
||||
@Before
|
||||
|
|
|
@ -22,9 +22,10 @@ import haveno.asset.AssetRegistry;
|
|||
import haveno.asset.Coin;
|
||||
import haveno.asset.coins.Ether;
|
||||
import haveno.common.config.BaseCurrencyNetwork;
|
||||
import haveno.core.locale.CurrencyUtil;
|
||||
import haveno.core.locale.Res;
|
||||
import haveno.core.locale.TradeCurrency;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
@ -32,10 +33,6 @@ import java.util.Optional;
|
|||
import java.util.ServiceLoader;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
|
|
@ -18,14 +18,13 @@
|
|||
package haveno.core.message;
|
||||
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
@Slf4j
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
|
||||
package haveno.core.monetary;
|
||||
|
||||
import haveno.core.monetary.Price;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
package haveno.core.network.p2p.seed;
|
||||
|
||||
import haveno.common.config.Config;
|
||||
import haveno.core.network.p2p.seed.DefaultSeedNodeRepository;
|
||||
import haveno.network.p2p.NodeAddress;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
|
|
@ -17,18 +17,15 @@
|
|||
|
||||
package haveno.core.notifications;
|
||||
|
||||
import haveno.common.util.Tuple2;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import haveno.common.util.Tuple2;
|
||||
import haveno.core.notifications.MobileModel;
|
||||
|
||||
@Slf4j
|
||||
public class MobileModelTest {
|
||||
|
||||
|
|
|
@ -20,9 +20,6 @@ package haveno.core.offer;
|
|||
import com.natpryce.makeiteasy.Instantiator;
|
||||
import com.natpryce.makeiteasy.Maker;
|
||||
import com.natpryce.makeiteasy.Property;
|
||||
import haveno.core.offer.Offer;
|
||||
import haveno.core.offer.OfferDirection;
|
||||
import haveno.core.offer.OfferPayload;
|
||||
|
||||
import static com.natpryce.makeiteasy.MakeItEasy.a;
|
||||
|
||||
|
|
|
@ -24,9 +24,6 @@ import static org.junit.Assert.assertTrue;
|
|||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
import haveno.core.offer.Offer;
|
||||
import haveno.core.offer.OfferPayload;
|
||||
|
||||
public class OfferTest {
|
||||
|
||||
@Test
|
||||
|
|
|
@ -8,27 +8,25 @@ import haveno.common.handlers.ResultHandler;
|
|||
import haveno.common.persistence.PersistenceManager;
|
||||
import haveno.core.api.CoreContext;
|
||||
import haveno.core.api.CoreMoneroConnectionsService;
|
||||
import haveno.core.offer.OfferBookService;
|
||||
import haveno.core.offer.OfferPayload;
|
||||
import haveno.core.offer.OpenOffer;
|
||||
import haveno.core.offer.OpenOfferManager;
|
||||
import haveno.core.offer.SignedOfferList;
|
||||
import haveno.core.trade.TradableList;
|
||||
import haveno.network.p2p.P2PService;
|
||||
import haveno.network.p2p.peers.PeerManager;
|
||||
import java.nio.file.Files;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.nio.file.Files;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
import static com.natpryce.makeiteasy.MakeItEasy.make;
|
||||
import static haveno.core.offer.OfferMaker.btcUsdOffer;
|
||||
import static junit.framework.TestCase.assertTrue;
|
||||
import static org.mockito.ArgumentMatchers.any;
|
||||
import static org.mockito.Mockito.*;
|
||||
import static org.mockito.Mockito.doAnswer;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.times;
|
||||
import static org.mockito.Mockito.verify;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
public class OpenOfferManagerTest {
|
||||
private PersistenceManager<TradableList<OpenOffer>> persistenceManager;
|
||||
|
|
|
@ -17,17 +17,15 @@
|
|||
|
||||
package haveno.core.offer.availability;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import haveno.core.offer.availability.DisputeAgentSelection;
|
||||
|
||||
public class ArbitratorSelectionTest {
|
||||
@Test
|
||||
public void testGetLeastUsedArbitrator() {
|
||||
|
|
|
@ -17,23 +17,20 @@
|
|||
|
||||
package haveno.core.payment;
|
||||
|
||||
import java.util.Collections;
|
||||
|
||||
import haveno.core.account.witness.AccountAgeWitness;
|
||||
import haveno.core.account.witness.AccountAgeWitnessService;
|
||||
import haveno.core.offer.Offer;
|
||||
import haveno.core.payment.payload.PaymentAccountPayload;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.Collections;
|
||||
|
||||
import static org.junit.Assert.assertNull;
|
||||
import static org.mockito.ArgumentMatchers.any;
|
||||
import static org.mockito.ArgumentMatchers.eq;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
import haveno.core.account.witness.AccountAgeWitness;
|
||||
import haveno.core.account.witness.AccountAgeWitnessService;
|
||||
import haveno.core.offer.Offer;
|
||||
import haveno.core.payment.PaymentAccount;
|
||||
import haveno.core.payment.PaymentAccounts;
|
||||
import haveno.core.payment.payload.PaymentAccountPayload;
|
||||
|
||||
public class PaymentAccountsTest {
|
||||
@Test
|
||||
public void testGetOldestPaymentAccountForOfferWhenNoValidAccounts() {
|
||||
|
|
|
@ -20,12 +20,6 @@ package haveno.core.payment;
|
|||
import com.google.common.collect.Lists;
|
||||
import haveno.core.locale.CryptoCurrency;
|
||||
import haveno.core.offer.Offer;
|
||||
import haveno.core.payment.CountryBasedPaymentAccount;
|
||||
import haveno.core.payment.NationalBankAccount;
|
||||
import haveno.core.payment.PaymentAccount;
|
||||
import haveno.core.payment.ReceiptPredicates;
|
||||
import haveno.core.payment.SepaAccount;
|
||||
import haveno.core.payment.SepaInstantAccount;
|
||||
import haveno.core.payment.payload.PaymentMethod;
|
||||
import org.junit.Test;
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
|
||||
package haveno.core.payment;
|
||||
|
||||
import haveno.core.offer.Offer;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
@ -25,18 +26,11 @@ import org.mockito.junit.MockitoJUnitRunner;
|
|||
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.mockito.Mockito.*;
|
||||
|
||||
import haveno.core.offer.Offer;
|
||||
import haveno.core.payment.CountryBasedPaymentAccount;
|
||||
import haveno.core.payment.MoneyGramAccount;
|
||||
import haveno.core.payment.NationalBankAccount;
|
||||
import haveno.core.payment.PaymentAccount;
|
||||
import haveno.core.payment.ReceiptPredicates;
|
||||
import haveno.core.payment.ReceiptValidator;
|
||||
import haveno.core.payment.SameBankAccount;
|
||||
import haveno.core.payment.SpecificBanksAccount;
|
||||
import haveno.core.payment.WesternUnionAccount;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.never;
|
||||
import static org.mockito.Mockito.verify;
|
||||
import static org.mockito.Mockito.verifyNoMoreInteractions;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
@RunWith(MockitoJUnitRunner.StrictStubs.class)
|
||||
public class ReceiptValidatorTest {
|
||||
|
|
|
@ -19,9 +19,6 @@ package haveno.core.payment;
|
|||
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.mockito.Mockito.mock;
|
||||
|
||||
public class TradeLimitsTest {
|
||||
@Test
|
||||
public void testGetFirstMonthRiskBasedTradeLimit() {
|
||||
|
|
|
@ -22,7 +22,6 @@ import haveno.common.config.BaseCurrencyNetwork;
|
|||
import haveno.common.config.Config;
|
||||
import haveno.core.locale.CurrencyUtil;
|
||||
import haveno.core.locale.Res;
|
||||
import haveno.core.payment.validation.AltCoinAddressValidator;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.assertFalse;
|
||||
|
@ -42,7 +41,7 @@ public class AltCoinAddressValidatorTest {
|
|||
|
||||
validator.setCurrencyCode("BTC");
|
||||
assertTrue(validator.validate("17VZNX1SN5NtKa8UQFxwQbFeFc3iqRYhem").isValid);
|
||||
|
||||
|
||||
validator.setCurrencyCode("XMR");
|
||||
assertTrue(validator.validate("4AuUM6PedofLWKfRCX1fP3SoNZUzq6FSAbpevHRR6tVuMpZc3HznVeudmNGkEB75apjE7WKVgZZh1YvPVxZoHFN88NCdmWw").isValid);
|
||||
|
||||
|
|
|
@ -18,32 +18,19 @@
|
|||
package haveno.core.provider.mempool;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import haveno.core.provider.mempool.TxValidator;
|
||||
import haveno.core.util.ParsingUtils;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
|
||||
import org.bitcoinj.core.Coin;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import org.mockito.Mockito;
|
||||
import org.mockito.stubbing.Answer;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.Assert;
|
||||
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.when;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
public class TxValidatorTest {
|
||||
private static final Logger log = LoggerFactory.getLogger(TxValidatorTest.class);
|
||||
|
|
|
@ -17,16 +17,13 @@
|
|||
|
||||
package haveno.core.provider.price;
|
||||
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
import static junit.framework.TestCase.assertTrue;
|
||||
|
||||
import haveno.core.provider.price.PriceFeedService;
|
||||
|
||||
@Ignore
|
||||
public class MarketPriceFeedServiceTest {
|
||||
private static final Logger log = LoggerFactory.getLogger(MarketPriceFeedServiceTest.class);
|
||||
|
|
|
@ -17,6 +17,9 @@
|
|||
|
||||
package haveno.core.trade;
|
||||
|
||||
import haveno.core.offer.Offer;
|
||||
import haveno.core.offer.OfferPayload;
|
||||
import haveno.core.offer.OpenOffer;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
@ -24,11 +27,6 @@ import static org.mockito.Mockito.RETURNS_DEEP_STUBS;
|
|||
import static org.mockito.Mockito.mock;
|
||||
import static protobuf.PersistableEnvelope.MessageCase.TRADABLE_LIST;
|
||||
|
||||
import haveno.core.offer.Offer;
|
||||
import haveno.core.offer.OfferPayload;
|
||||
import haveno.core.offer.OpenOffer;
|
||||
import haveno.core.trade.TradableList;
|
||||
|
||||
public class TradableListTest {
|
||||
|
||||
@Test
|
||||
|
|
|
@ -1,22 +1,17 @@
|
|||
package haveno.core.trade.txproof.xmr;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
|
||||
import haveno.core.user.AutoConfirmSettings;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
|
||||
import static haveno.core.trade.txproof.xmr.XmrTxProofParser.MAX_DATE_TOLERANCE;
|
||||
import static org.junit.Assert.assertNotSame;
|
||||
import static org.junit.Assert.assertSame;
|
||||
|
||||
import haveno.core.trade.txproof.xmr.XmrTxProofModel;
|
||||
import haveno.core.trade.txproof.xmr.XmrTxProofParser;
|
||||
import haveno.core.trade.txproof.xmr.XmrTxProofRequest;
|
||||
import haveno.core.user.AutoConfirmSettings;
|
||||
|
||||
public class XmrTxProofParserTest {
|
||||
private XmrTxProofModel xmrTxProofModel;
|
||||
private String recipientAddressHex = "e957dac72bcec80d59b2fecacfa7522223b6a5df895b7e388e60297e85f3f867b42f43e8d9f086a99a997704ceb92bd9cd99d33952de90c9f5f93c82c62360ae";
|
||||
|
|
|
@ -25,19 +25,16 @@ import haveno.core.locale.CurrencyUtil;
|
|||
import haveno.core.locale.FiatCurrency;
|
||||
import haveno.core.locale.GlobalSettings;
|
||||
import haveno.core.locale.Res;
|
||||
import haveno.core.user.Preferences;
|
||||
import haveno.core.user.PreferencesPayload;
|
||||
import haveno.core.xmr.nodes.LocalBitcoinNode;
|
||||
import javafx.collections.ObservableList;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Currency;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.mockito.ArgumentMatchers.anyString;
|
||||
|
|
|
@ -23,11 +23,10 @@ import haveno.core.arbitration.ArbitratorTest;
|
|||
import haveno.core.arbitration.MediatorTest;
|
||||
import haveno.core.filter.Filter;
|
||||
import haveno.core.proto.CoreProtoResolver;
|
||||
import haveno.core.user.UserPayload;
|
||||
import java.util.HashSet;
|
||||
|
||||
import org.junit.Ignore;
|
||||
|
||||
import java.util.HashSet;
|
||||
|
||||
public class UserPayloadModelVOTest {
|
||||
@Ignore("TODO InvalidKeySpecException at haveno.common.crypto.Sig.getPublicKeyFromBytes(Sig.java:135)")
|
||||
public void testRoundtrip() {
|
||||
|
|
|
@ -1,21 +1,17 @@
|
|||
package haveno.core.util;
|
||||
|
||||
import org.bitcoinj.utils.Fiat;
|
||||
|
||||
import java.util.Locale;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import com.natpryce.makeiteasy.Instantiator;
|
||||
import com.natpryce.makeiteasy.Maker;
|
||||
import com.natpryce.makeiteasy.Property;
|
||||
import haveno.core.locale.GlobalSettings;
|
||||
import haveno.core.locale.Res;
|
||||
import haveno.core.monetary.Altcoin;
|
||||
import haveno.core.monetary.Price;
|
||||
import haveno.core.util.FormattingUtils;
|
||||
import org.bitcoinj.utils.Fiat;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.Locale;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import static com.natpryce.makeiteasy.MakeItEasy.a;
|
||||
import static com.natpryce.makeiteasy.MakeItEasy.make;
|
||||
import static com.natpryce.makeiteasy.MakeItEasy.with;
|
||||
|
|
|
@ -20,8 +20,6 @@ package haveno.core.util;
|
|||
import haveno.common.proto.ProtoUtil;
|
||||
import haveno.core.offer.OfferDirection;
|
||||
import haveno.core.offer.OpenOffer;
|
||||
import protobuf.OfferPayload;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
|
|
@ -17,18 +17,17 @@
|
|||
|
||||
package haveno.core.util;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import haveno.core.locale.GlobalSettings;
|
||||
import haveno.core.locale.Res;
|
||||
import haveno.core.util.validation.RegexValidator;
|
||||
import haveno.core.util.validation.RegexValidatorFactory;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
|
||||
public class RegexValidatorTest {
|
||||
|
|
|
@ -17,19 +17,17 @@
|
|||
|
||||
package haveno.core.util.coin;
|
||||
|
||||
import haveno.core.monetary.Price;
|
||||
import haveno.core.trade.HavenoUtils;
|
||||
import haveno.core.xmr.wallet.Restrictions;
|
||||
import org.bitcoinj.core.Coin;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import java.math.BigInteger;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
import haveno.core.monetary.Price;
|
||||
import haveno.core.trade.HavenoUtils;
|
||||
import haveno.core.util.coin.CoinUtil;
|
||||
import haveno.core.xmr.wallet.Restrictions;
|
||||
import java.math.BigInteger;
|
||||
|
||||
public class CoinUtilTest {
|
||||
|
||||
@Test
|
||||
|
|
|
@ -17,18 +17,16 @@
|
|||
|
||||
package haveno.core.xmr.nodes;
|
||||
|
||||
import org.bitcoinj.core.NetworkParameters;
|
||||
import org.bitcoinj.core.PeerAddress;
|
||||
|
||||
import com.runjva.sourceforge.jsocks.protocol.Socks5Proxy;
|
||||
import haveno.core.xmr.nodes.BtcNetworkConfig;
|
||||
import haveno.core.xmr.setup.WalletConfig;
|
||||
import haveno.network.Socks5MultiDiscovery;
|
||||
import java.util.Collections;
|
||||
|
||||
import org.bitcoinj.core.NetworkParameters;
|
||||
import org.bitcoinj.core.PeerAddress;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.Collections;
|
||||
|
||||
import static org.mockito.ArgumentMatchers.any;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.never;
|
||||
|
|
|
@ -17,17 +17,15 @@
|
|||
|
||||
package haveno.core.xmr.nodes;
|
||||
|
||||
import org.bitcoinj.core.PeerAddress;
|
||||
|
||||
import com.runjva.sourceforge.jsocks.protocol.Socks5Proxy;
|
||||
import haveno.core.xmr.nodes.BtcNodeConverter;
|
||||
import haveno.core.xmr.nodes.BtcNodeConverter.Facade;
|
||||
import haveno.core.xmr.nodes.BtcNodes.BtcNode;
|
||||
import haveno.network.DnsLookupException;
|
||||
import java.net.InetAddress;
|
||||
|
||||
import org.bitcoinj.core.PeerAddress;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.net.InetAddress;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.mockito.ArgumentMatchers.any;
|
||||
import static org.mockito.ArgumentMatchers.anyString;
|
||||
|
|
|
@ -17,19 +17,15 @@
|
|||
|
||||
package haveno.core.xmr.nodes;
|
||||
|
||||
import org.bitcoinj.core.PeerAddress;
|
||||
|
||||
import com.runjva.sourceforge.jsocks.protocol.Socks5Proxy;
|
||||
import haveno.core.xmr.nodes.BtcNodeConverter;
|
||||
import haveno.core.xmr.nodes.BtcNodesRepository;
|
||||
import haveno.core.xmr.nodes.BtcNodes.BtcNode;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.runjva.sourceforge.jsocks.protocol.Socks5Proxy;
|
||||
import haveno.core.xmr.nodes.BtcNodes.BtcNode;
|
||||
import org.bitcoinj.core.PeerAddress;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
|
|
@ -17,10 +17,12 @@
|
|||
|
||||
package haveno.core.xmr.nodes;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import haveno.core.user.Preferences;
|
||||
import haveno.core.xmr.nodes.BtcNodes.BtcNode;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static haveno.core.xmr.nodes.BtcNodes.BitcoinNodesOption.CUSTOM;
|
||||
import static haveno.core.xmr.nodes.BtcNodes.BitcoinNodesOption.PUBLIC;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
@ -28,11 +30,6 @@ import static org.junit.Assert.assertTrue;
|
|||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
import haveno.core.user.Preferences;
|
||||
import haveno.core.xmr.nodes.BtcNodes;
|
||||
import haveno.core.xmr.nodes.BtcNodesSetupPreferences;
|
||||
import haveno.core.xmr.nodes.BtcNodes.BtcNode;
|
||||
|
||||
public class BtcNodesSetupPreferencesTest {
|
||||
@Test
|
||||
public void testSelectPreferredNodesWhenPublicOption() {
|
||||
|
|
|
@ -18,14 +18,11 @@
|
|||
package haveno.core.xmr.wallet;
|
||||
|
||||
import org.bitcoinj.core.Coin;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import haveno.core.xmr.wallet.Restrictions;
|
||||
|
||||
@SuppressWarnings("ConstantConditions")
|
||||
public class RestrictionsTest {
|
||||
@Test
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue