Class Passwords

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

public class Passwords
extends MockUnitBase
implements MockUnitString
  • Constructor Details

  • Method Details

    • passwords

      public static Passwords passwords()

      Returns a Passwords object that can be used to generate arbitrary user passwords.

      Returns:
      A re-usable Passwords object. The Passwords class implements MockUnitString.
    • 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>.
    • type

      public MockUnitString type​(PassStrengthType passStrengthType)

      This method returns a new MockUnitString that can be used to generate passwords of a certain type.

      Parameters:
      passStrengthType - The type of password.
      Returns:
      A new MockUnitString
    • types

      public MockUnitString types​(PassStrengthType... types)

      This method returns a new MockUnitString that can be used to generate passwords of certain type(s).

      Parameters:
      types - A var-arg array containing the selected password types.
      Returns:
      A new MockUnitString
    • weak

      public MockUnitString weak()

      This method returns a new MockUnitString that can be used to generate weak passwords (short english nouns).

      Returns:
      A new MockUnitString.
    • medium

      public MockUnitString medium()

      This method returns a new MockUnitString that can be used to generate passwords with a medium security risk.

      Returns:
      A new MockUnitString.
    • strong

      public MockUnitString strong()

      This method returns a new MockUnitString that can be used to generate strong passwords.

      Returns:
      A new MockUnitString.