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

public class CVVS
extends MockUnitBase
implements MockUnitString
  • Constructor Details

  • Method Details

    • cvvs

      public static CVVS cvvs()

      Returns a CVVS object that can be used to generate credit card cvv codes.

      Note: By default the values generated are 3-digits CVV codes.

      Returns:
      A re-usable CVVS object. The CVVS class implements the MockUnitString interface.
    • 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>.
    • cvv3

      public MockUnitString cvv3()

      Returns a new MockUnitString that can be used to generate a 3-digit code.

      Returns:
      A new MockUnitString
    • cvv4

      public MockUnitString cvv4()

      Returns a new MockUnitString that can be used to generate a 4-digit code.

      Returns:
      A new MockUnitString.
    • type

      public MockUnitString type​(CVVType type)

      Returns a new MockUnitString that can be used to generate a CVV code based on the supplied type: CVVType

      Parameters:
      type - The type of the CVV.
      Returns:
      A new MockUnitString
    • types

      public MockUnitString types​(CVVType... types)
      Returns a new MockUnitString that can be used to generate a CVV code based on the supplied types: CVVType.
      Parameters:
      types - A var-arg array containing the supplied types.
      Returns:
      A new MockUnitString.