Skip to content

Commit

Permalink
junit4->5
Browse files Browse the repository at this point in the history
  • Loading branch information
justinvforvendetta committed Jul 27, 2024
1 parent 5f6d075 commit 95671d0
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
1 change: 1 addition & 0 deletions core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ dependencies {
api 'com.google.code.findbugs:jsr305:3.0.2'
api 'com.madgag.spongycastle:core:1.58.0.0'
api 'com.lambdaworks:scrypt:1.4.0'
api 'org.junit.jupiter:junit-jupiter-api:5.8.2'
api 'com.google.protobuf:protobuf-java:3.25.3'
api 'org.slf4j:slf4j-jdk14:2.0.13'
api 'org.json:json:20240303'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import org.bitcoinj.crypto.MnemonicException;
import org.bitcoinj.store.UnreadableWalletException;
import org.bitcoinj.wallet.DeterministicSeed;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.spongycastle.util.encoders.Hex;

import java.io.UnsupportedEncodingException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import org.bitcoinj.core.ECKey;
import org.bitcoinj.script.Script;
import org.bouncycastle.util.encoders.Hex;
import org.junit.Test;
import org.junit.jupiter.api.Test;

import static org.junit.Assert.assertEquals;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import com.vergepay.core.coins.nxt.Transaction;
import com.vergepay.core.coins.nxt.TransactionImpl;
import com.vergepay.core.protos.Protos;
import com.vergepay.core.wallet.SendRequest;
import com.vergepay.core.wallet.Wallet;
import com.vergepay.core.wallet.WalletAccount;

Expand All @@ -23,8 +22,8 @@
import org.bitcoinj.crypto.MnemonicException;
import org.bitcoinj.store.UnreadableWalletException;
import org.bitcoinj.wallet.DeterministicSeed;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.BeforeEach;
import org.spongycastle.crypto.params.KeyParameter;
import org.spongycastle.util.encoders.Hex;

Expand Down Expand Up @@ -53,7 +52,7 @@ public class NxtFamilyWalletTest {
NxtFamilyWallet nxtAccount;
NxtFamilyWallet otherAccount;

@Before
@BeforeEach
public void setup() throws MnemonicException, UnreadableWalletException {
DeterministicSeed seed = new DeterministicSeed(recoveryPhrase, null, "", 0);
DeterministicKey masterKey = HDKeyDerivation.createMasterPrivateKey(seed.getSeedBytes());
Expand All @@ -75,7 +74,7 @@ public void serializeUnencryptedNormal() throws Exception {
}


@Test
@org.junit.jupiter.api.Test
public void testAccountLegacyNXT() throws UnsupportedEncodingException {
byte[] pub = nxtAccount.getPublicKey();
long id = Account.getId(pub);
Expand All @@ -85,7 +84,7 @@ public void testAccountLegacyNXT() throws UnsupportedEncodingException {
assertEquals(nxtAccountId, id);
}

@Test
@org.junit.jupiter.api.Test
public void testHDAccountNxt() throws MnemonicException {
byte[] privateKey = nxtAccount.rootKey.getPrivateKey();
byte[] publicKey = nxtAccount.getPublicKey();
Expand Down
3 changes: 3 additions & 0 deletions wallet/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ android {
}
resources {
excludes += ['lib/x86_64/darwin/libscrypt.dylib']
excludes += "/META-INF/{AL2.0,LGPL2.1}"
merges += "META-INF/LICENSE.md"
merges += "META-INF/LICENSE-notice.md"
}
}

Expand Down

0 comments on commit 95671d0

Please sign in to comment.