-
-
Notifications
You must be signed in to change notification settings - Fork 47
MockUnitDays
Important Note: The library the documentation has moved to www.mockneat.com. The information found on this wiki is quite outdated. Please check the new site.
The MockUnitDays interface extends MockUnit<DayOfWeek>.
public interface MockUnitDays extends MockUnit<DayOfWeek> This means that it "inherits" all the methods from MockUnit<DayOfWeek>
The easiest way to obtain a MockUnitDays is to call the days() method from MockNeat<T>.
Methods that are particular to MockUnitDays:
| Method | Description |
|---|---|
display() |
This generates a MockUnitString from MockUnitDays by transforming the days of the week into localised strings. |
This method generates a MockUnitString from a MockUnitDays by transforming the days of the week into localised strings.
Examples of generating a String that represents a random day of the week-end in French:
String day = m.days()
.after(FRIDAY)
.display(TextStyle.FULL_STANDALONE, Locale.FRANCE)
.val();
// Possible Output: "dimanche"The method signatures are:
default MockUnitString display(TextStyle textStyle, Locale locale)When we want to use the default locale:
default MockUnitString display(TextStyle textStyle)When we want to use the default locale and the textStyle as FULL_STANDALONE:
default MockUnitString display()Using the library:
Real World Examples: