Class LocalDates

    • Field Detail

      • EPOCH_START

        public static final java.time.LocalDate EPOCH_START
    • Constructor Detail

      • LocalDates

        protected LocalDates()
      • LocalDates

        public LocalDates​(MockNeat mockNeat)
    • Method Detail

      • localDates

        public static LocalDates localDates()

        Returns a LocalDates object that can be used to generate arbitrary LocalDate objects.

        Returns:
        A re-usable LocalDates object. The LocalDates implements MockUnitLocalDate.
      • supplier

        public java.util.function.Supplier<java.time.LocalDate> 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.time.LocalDate>
        Returns:
        A Supplier<T>.
      • thisYear

        public MockUnitLocalDate thisYear()

        This method can be used to generate date objects from the current year.

        Returns:
        A new MockUnitLocalDate object.
      • thisMonth

        public MockUnitLocalDate thisMonth()

        This method can be used to generate date objects from the current month.

        Returns:
        A new MockUnitLocalDate object.
      • between

        public MockUnitLocalDate between​(java.time.LocalDate lowerDate,
                                         java.time.LocalDate upperDate)

        This method can be used to generate date objects in the defined range (lowerDate, upperDate).

        Parameters:
        lowerDate - The lower limit of the interval.
        upperDate - The upper limit of the interval.
        Returns:
        A new MockUnitLocalDate object.
      • future

        public MockUnitLocalDate future​(java.time.LocalDate maxDate)

        This method can be used to generate date objects in the future.

        Parameters:
        maxDate - The maxDate from the future.
        Returns:
        A new MockUnitLocalDate object.
      • past

        public MockUnitLocalDate past​(java.time.LocalDate minDate)

        This method can be used to generate date objects in the past.

        Parameters:
        minDate - The minDate from the past.
        Returns:
        A new MockUnitLocalDate.