@Test public void shouldConvertCorrectlyToDouble() { assertThat(new Volume(56, MINI_LOT).asLot()).isEqualTo(5.6, ACCURACY); assertThat(new Volume(7123456, BASE).asLot()).isEqualTo(71.23456, ACCURACY); assertThat(new Volume(-6, MICRO_LOT).asLot()).isEqualTo(-0.06, ACCURACY); }
public double asLot() { return (double) volume / ACCURACY; }
Volume { public double asLot() { return (double) volume / ACCURACY; } }
Volume { public double asLot() { return (double) volume / ACCURACY; } Volume(final long volume, final VolumeUnit unit); }
Volume { public double asLot() { return (double) volume / ACCURACY; } Volume(final long volume, final VolumeUnit unit); long asAbsolute(); double asLot(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); }
Volume { public double asLot() { return (double) volume / ACCURACY; } Volume(final long volume, final VolumeUnit unit); long asAbsolute(); double asLot(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }