mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-06-20 21:04:28 -04:00
Add default arbitrator
This commit is contained in:
parent
486c83efaa
commit
312807a6ef
25 changed files with 399 additions and 192 deletions
|
@ -41,10 +41,10 @@ public class CreateOfferViewModelTest {
|
|||
|
||||
@Before
|
||||
public void setup() {
|
||||
BSFormatter formatter = new BSFormatter(new User());
|
||||
BSFormatter formatter = new BSFormatter(new User(), null);
|
||||
formatter.setLocale(Locale.US);
|
||||
formatter.setFiatCurrencyCode("USD");
|
||||
model = new CreateOfferDataModel(null, null, null, null, null, formatter);
|
||||
model = new CreateOfferDataModel(null, null, null, null, null, null, formatter);
|
||||
|
||||
presenter = new CreateOfferViewModel(model, new FiatValidator(null), new BtcValidator(), formatter);
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ public class BSFormatterTest {
|
|||
|
||||
@Test
|
||||
public void testParseToBtc() {
|
||||
BSFormatter formatter = new BSFormatter(new User());
|
||||
BSFormatter formatter = new BSFormatter(new User(), null);
|
||||
formatter.useMilliBitFormat(false);
|
||||
assertEquals(Coin.ZERO, formatter.parseToCoin("0"));
|
||||
assertEquals(Coin.COIN, formatter.parseToCoin("1"));
|
||||
|
@ -64,7 +64,7 @@ public class BSFormatterTest {
|
|||
|
||||
@Test
|
||||
public void testFormatCoin() {
|
||||
BSFormatter formatter = new BSFormatter(new User());
|
||||
BSFormatter formatter = new BSFormatter(new User(), null);
|
||||
formatter.useMilliBitFormat(false);
|
||||
assertEquals("1.00", formatter.formatCoin(Coin.COIN));
|
||||
assertEquals("1.0120", formatter.formatCoin(Coin.parseCoin("1.012")));
|
||||
|
@ -97,7 +97,7 @@ public class BSFormatterTest {
|
|||
|
||||
@Test
|
||||
public void testFormatCoinWithCode() {
|
||||
BSFormatter formatter = new BSFormatter(new User());
|
||||
BSFormatter formatter = new BSFormatter(new User(), null);
|
||||
formatter.useMilliBitFormat(false);
|
||||
assertEquals("1.00 BTC", formatter.formatCoinWithCode(Coin.COIN));
|
||||
assertEquals("1.01 BTC", formatter.formatCoinWithCode(Coin.parseCoin("1.01")));
|
||||
|
@ -132,7 +132,7 @@ public class BSFormatterTest {
|
|||
|
||||
@Test
|
||||
public void testParseToBtcWith4Decimals() {
|
||||
BSFormatter formatter = new BSFormatter(new User());
|
||||
BSFormatter formatter = new BSFormatter(new User(), null);
|
||||
formatter.useMilliBitFormat(false);
|
||||
assertEquals(Coin.parseCoin("0"), formatter.parseToCoinWith4Decimals("0"));
|
||||
assertEquals(Coin.parseCoin("0"), formatter.parseToCoinWith4Decimals(null));
|
||||
|
@ -143,7 +143,7 @@ public class BSFormatterTest {
|
|||
|
||||
@Test
|
||||
public void testHasBtcValidDecimals() {
|
||||
BSFormatter formatter = new BSFormatter(new User());
|
||||
BSFormatter formatter = new BSFormatter(new User(), null);
|
||||
formatter.useMilliBitFormat(false);
|
||||
formatter.setLocale(Locale.GERMAN);
|
||||
assertTrue(formatter.hasBtcValidDecimals(null));
|
||||
|
@ -159,7 +159,7 @@ public class BSFormatterTest {
|
|||
|
||||
@Test
|
||||
public void testParseToFiatWith2Decimals() {
|
||||
BSFormatter formatter = new BSFormatter(new User());
|
||||
BSFormatter formatter = new BSFormatter(new User(), null);
|
||||
formatter.useMilliBitFormat(false);
|
||||
formatter.setLocale(Locale.GERMAN);
|
||||
assertEquals("0", formatter.parseToFiatWith2Decimals("0").toPlainString());
|
||||
|
@ -172,7 +172,7 @@ public class BSFormatterTest {
|
|||
|
||||
@Test
|
||||
public void testHasFiatValidDecimals() {
|
||||
BSFormatter formatter = new BSFormatter(new User());
|
||||
BSFormatter formatter = new BSFormatter(new User(), null);
|
||||
formatter.useMilliBitFormat(false);
|
||||
formatter.setLocale(Locale.GERMAN);
|
||||
assertTrue(formatter.hasFiatValidDecimals(null));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue