Correct two unit tests from BigDecimal to long/int.

This commit is contained in:
catbref 2020-05-06 15:03:41 +01:00
parent 74b5401e84
commit d1bc500ab9
2 changed files with 3 additions and 5 deletions

View File

@ -2,7 +2,6 @@ package org.qortal.test.minting;
import static org.junit.Assert.*; import static org.junit.Assert.*;
import java.math.BigDecimal;
import org.junit.After; import org.junit.After;
import org.junit.Before; import org.junit.Before;
@ -32,7 +31,7 @@ public class BlocksMintedCountTests extends Common {
@Test @Test
public void testNonSelfShare() throws DataException { public void testNonSelfShare() throws DataException {
final BigDecimal sharePercent = new BigDecimal("12.8"); final int sharePercent = 12_80;
try (final Repository repository = RepositoryManager.getRepository()) { try (final Repository repository = RepositoryManager.getRepository()) {
// Create reward-share // Create reward-share

View File

@ -2,7 +2,6 @@ package org.qortal.test.minting;
import static org.junit.Assert.*; import static org.junit.Assert.*;
import java.math.BigDecimal;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
@ -30,7 +29,7 @@ import io.druid.extendedset.intset.ConciseSet;
public class DisagreementTests extends Common { public class DisagreementTests extends Common {
private static final BigDecimal CANCEL_SHARE_PERCENT = BigDecimal.ONE.negate(); private static final int CANCEL_SHARE_PERCENT = -1;
@Before @Before
public void beforeTest() throws DataException { public void beforeTest() throws DataException {
@ -59,7 +58,7 @@ public class DisagreementTests extends Common {
*/ */
@Test @Test
public void testOnlineAccounts() throws DataException { public void testOnlineAccounts() throws DataException {
final BigDecimal sharePercent = new BigDecimal("12.8"); final int sharePercent = 12_80;
try (final Repository repository = RepositoryManager.getRepository()) { try (final Repository repository = RepositoryManager.getRepository()) {
TestAccount mintingAccount = Common.getTestAccount(repository, "alice-reward-share"); TestAccount mintingAccount = Common.getTestAccount(repository, "alice-reward-share");