java.lang.Object
net.andreinc.mockneat.abstraction.MockUnitBase
net.andreinc.mockneat.unit.financial.Money
All Implemented Interfaces:
MockUnit<java.lang.String>, MockUnitString

public class Money
extends MockUnitBase
implements MockUnitString
  • Field Details

  • Constructor Details

  • Method Details

    • money

      public static Money money()

      Returns a Money object that can be used to generate arbitrary "money" information.

      The generated text represents sums of money generated using NumberFormat.getCurrencyInstance().format(...).

      Note:By default it returns a random sum of money

      Returns:
      A re-usable Money object. The Money class implements MockUnitString.
    • locale

      public Money locale​(java.util.Locale locale)
    • range

      public MockUnitString range​(double lowerBound, double upperBound)
    • bound

      public MockUnitString bound​(double bound)
    • supplier

      public java.util.function.Supplier<java.lang.String> supplier()
      Description copied from interface: MockUnit
      This is the sole abstract method of the interface. Needs to be implemented every-time a MockUnit is implemented.
      Specified by:
      supplier in interface MockUnit<java.lang.String>
      Returns:
      A Supplier<T>.