@Test public void testFromWei() { assertThat(Convert.fromWei("21000000000000", Convert.Unit.WEI), is(new BigDecimal("21000000000000"))); assertThat(Convert.fromWei("21000000000000", Convert.Unit.KWEI), is(new BigDecimal("21000000000"))); assertThat(Convert.fromWei("21000000000000", Convert.Unit.MWEI), is(new BigDecimal("21000000"))); assertThat(Convert.fromWei("21000000000000", Convert.Unit.GWEI), is(new BigDecimal("21000"))); assertThat(Convert.fromWei("21000000000000", Convert.Unit.SZABO), is(new BigDecimal("21"))); assertThat(Convert.fromWei("21000000000000", Convert.Unit.FINNEY), is(new BigDecimal("0.021"))); assertThat(Convert.fromWei("21000000000000", Convert.Unit.ETHER), is(new BigDecimal("0.000021"))); assertThat(Convert.fromWei("21000000000000", Convert.Unit.KETHER), is(new BigDecimal("0.000000021"))); assertThat(Convert.fromWei("21000000000000", Convert.Unit.METHER), is(new BigDecimal("0.000000000021"))); assertThat(Convert.fromWei("21000000000000", Convert.Unit.GETHER), is(new BigDecimal("0.000000000000021"))); }
public static BigDecimal fromWei(String number, Unit unit) { return fromWei(new BigDecimal(number), unit); }
Convert { public static BigDecimal fromWei(String number, Unit unit) { return fromWei(new BigDecimal(number), unit); } }
Convert { public static BigDecimal fromWei(String number, Unit unit) { return fromWei(new BigDecimal(number), unit); } private  Convert(); }
Convert { public static BigDecimal fromWei(String number, Unit unit) { return fromWei(new BigDecimal(number), unit); } private  Convert(); static BigDecimal fromWei(String number, Unit unit); static BigDecimal fromWei(BigDecimal number, Unit unit); static BigDecimal toWei(String number, Unit unit); static BigDecimal toWei(BigDecimal number, Unit unit); }
Convert { public static BigDecimal fromWei(String number, Unit unit) { return fromWei(new BigDecimal(number), unit); } private  Convert(); static BigDecimal fromWei(String number, Unit unit); static BigDecimal fromWei(BigDecimal number, Unit unit); static BigDecimal toWei(String number, Unit unit); static BigDecimal toWei(BigDecimal number, Unit unit);  }