Java Code Examples for java.time.chrono.HijrahDate#range()
The following examples show how to use
java.time.chrono.HijrahDate#range() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TestUmmAlQuraChronology.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
@Test(dataProvider="dates") public void Test_UmmAlQuraRanges(HijrahDate date, int minYear, int maxYear, int minMonth, int maxMonth, int minDay, int maxDay, int maxChronoDay) { // Check the chronology ranges HijrahChronology chrono = date.getChronology(); ValueRange yearRange = chrono.range(YEAR); assertEquals(yearRange.getMinimum(), minYear, "Minimum year for Hijrah chronology"); assertEquals(yearRange.getLargestMinimum(), minYear, "Largest minimum year for Hijrah chronology"); assertEquals(yearRange.getMaximum(), maxYear, "Maximum year for Hijrah chronology"); assertEquals(yearRange.getSmallestMaximum(), maxYear, "Smallest Maximum year for Hijrah chronology"); ValueRange monthRange = chrono.range(MONTH_OF_YEAR); assertEquals(monthRange.getMinimum(), minMonth, "Minimum month for Hijrah chronology"); assertEquals(monthRange.getMaximum(), maxMonth, "Maximum month for Hijrah chronology"); ValueRange daysRange = chrono.range(DAY_OF_MONTH); assertEquals(daysRange.getMinimum(), minDay, "Minimum day for chronology"); assertEquals(daysRange.getMaximum(), maxChronoDay, "Maximum day for Hijrah chronology"); // Check the date ranges yearRange = date.range(YEAR); assertEquals(yearRange.getMinimum(), minYear, "Minimum year for Hijrah date"); assertEquals(yearRange.getLargestMinimum(), minYear, "Largest minimum year for Hijrah date"); assertEquals(yearRange.getMaximum(), maxYear, "Maximum year for Hijrah date"); assertEquals(yearRange.getSmallestMaximum(), maxYear, "Smallest maximum year for Hijrah date"); monthRange = date.range(MONTH_OF_YEAR); assertEquals(monthRange.getMinimum(), minMonth, "Minimum month for HijrahDate"); assertEquals(monthRange.getMaximum(), maxMonth, "Maximum month for HijrahDate"); daysRange = date.range(DAY_OF_MONTH); assertEquals(daysRange.getMinimum(), minDay, "Minimum day for HijrahDate"); assertEquals(daysRange.getMaximum(), maxDay, "Maximum day for HijrahDate"); }
Example 2
Source File: TestUmmAlQuraChronology.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
@Test(dataProvider="dates") public void Test_UmmAlQuraRanges(HijrahDate date, int minYear, int maxYear, int minMonth, int maxMonth, int minDay, int maxDay, int maxChronoDay) { // Check the chronology ranges HijrahChronology chrono = date.getChronology(); ValueRange yearRange = chrono.range(YEAR); assertEquals(yearRange.getMinimum(), minYear, "Minimum year for Hijrah chronology"); assertEquals(yearRange.getLargestMinimum(), minYear, "Largest minimum year for Hijrah chronology"); assertEquals(yearRange.getMaximum(), maxYear, "Maximum year for Hijrah chronology"); assertEquals(yearRange.getSmallestMaximum(), maxYear, "Smallest Maximum year for Hijrah chronology"); ValueRange monthRange = chrono.range(MONTH_OF_YEAR); assertEquals(monthRange.getMinimum(), minMonth, "Minimum month for Hijrah chronology"); assertEquals(monthRange.getMaximum(), maxMonth, "Maximum month for Hijrah chronology"); ValueRange daysRange = chrono.range(DAY_OF_MONTH); assertEquals(daysRange.getMinimum(), minDay, "Minimum day for chronology"); assertEquals(daysRange.getMaximum(), maxChronoDay, "Maximum day for Hijrah chronology"); // Check the date ranges yearRange = date.range(YEAR); assertEquals(yearRange.getMinimum(), minYear, "Minimum year for Hijrah date"); assertEquals(yearRange.getLargestMinimum(), minYear, "Largest minimum year for Hijrah date"); assertEquals(yearRange.getMaximum(), maxYear, "Maximum year for Hijrah date"); assertEquals(yearRange.getSmallestMaximum(), maxYear, "Smallest maximum year for Hijrah date"); monthRange = date.range(MONTH_OF_YEAR); assertEquals(monthRange.getMinimum(), minMonth, "Minimum month for HijrahDate"); assertEquals(monthRange.getMaximum(), maxMonth, "Maximum month for HijrahDate"); daysRange = date.range(DAY_OF_MONTH); assertEquals(daysRange.getMinimum(), minDay, "Minimum day for HijrahDate"); assertEquals(daysRange.getMaximum(), maxDay, "Maximum day for HijrahDate"); }
Example 3
Source File: TestUmmAlQuraChronology.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
@Test(dataProvider="dates") public void Test_UmmAlQuraRanges(HijrahDate date, int minYear, int maxYear, int minMonth, int maxMonth, int minDay, int maxDay, int maxChronoDay) { // Check the chronology ranges HijrahChronology chrono = date.getChronology(); ValueRange yearRange = chrono.range(YEAR); assertEquals(yearRange.getMinimum(), minYear, "Minimum year for Hijrah chronology"); assertEquals(yearRange.getLargestMinimum(), minYear, "Largest minimum year for Hijrah chronology"); assertEquals(yearRange.getMaximum(), maxYear, "Maximum year for Hijrah chronology"); assertEquals(yearRange.getSmallestMaximum(), maxYear, "Smallest Maximum year for Hijrah chronology"); ValueRange monthRange = chrono.range(MONTH_OF_YEAR); assertEquals(monthRange.getMinimum(), minMonth, "Minimum month for Hijrah chronology"); assertEquals(monthRange.getMaximum(), maxMonth, "Maximum month for Hijrah chronology"); ValueRange daysRange = chrono.range(DAY_OF_MONTH); assertEquals(daysRange.getMinimum(), minDay, "Minimum day for chronology"); assertEquals(daysRange.getMaximum(), maxChronoDay, "Maximum day for Hijrah chronology"); // Check the date ranges yearRange = date.range(YEAR); assertEquals(yearRange.getMinimum(), minYear, "Minimum year for Hijrah date"); assertEquals(yearRange.getLargestMinimum(), minYear, "Largest minimum year for Hijrah date"); assertEquals(yearRange.getMaximum(), maxYear, "Maximum year for Hijrah date"); assertEquals(yearRange.getSmallestMaximum(), maxYear, "Smallest maximum year for Hijrah date"); monthRange = date.range(MONTH_OF_YEAR); assertEquals(monthRange.getMinimum(), minMonth, "Minimum month for HijrahDate"); assertEquals(monthRange.getMaximum(), maxMonth, "Maximum month for HijrahDate"); daysRange = date.range(DAY_OF_MONTH); assertEquals(daysRange.getMinimum(), minDay, "Minimum day for HijrahDate"); assertEquals(daysRange.getMaximum(), maxDay, "Maximum day for HijrahDate"); }
Example 4
Source File: TestUmmAlQuraChronology.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
@Test(dataProvider="dates") public void Test_UmmAlQuraRanges(HijrahDate date, int minYear, int maxYear, int minMonth, int maxMonth, int minDay, int maxDay, int maxChronoDay) { // Check the chronology ranges HijrahChronology chrono = date.getChronology(); ValueRange yearRange = chrono.range(YEAR); assertEquals(yearRange.getMinimum(), minYear, "Minimum year for Hijrah chronology"); assertEquals(yearRange.getLargestMinimum(), minYear, "Largest minimum year for Hijrah chronology"); assertEquals(yearRange.getMaximum(), maxYear, "Maximum year for Hijrah chronology"); assertEquals(yearRange.getSmallestMaximum(), maxYear, "Smallest Maximum year for Hijrah chronology"); ValueRange monthRange = chrono.range(MONTH_OF_YEAR); assertEquals(monthRange.getMinimum(), minMonth, "Minimum month for Hijrah chronology"); assertEquals(monthRange.getMaximum(), maxMonth, "Maximum month for Hijrah chronology"); ValueRange daysRange = chrono.range(DAY_OF_MONTH); assertEquals(daysRange.getMinimum(), minDay, "Minimum day for chronology"); assertEquals(daysRange.getMaximum(), maxChronoDay, "Maximum day for Hijrah chronology"); // Check the date ranges yearRange = date.range(YEAR); assertEquals(yearRange.getMinimum(), minYear, "Minimum year for Hijrah date"); assertEquals(yearRange.getLargestMinimum(), minYear, "Largest minimum year for Hijrah date"); assertEquals(yearRange.getMaximum(), maxYear, "Maximum year for Hijrah date"); assertEquals(yearRange.getSmallestMaximum(), maxYear, "Smallest maximum year for Hijrah date"); monthRange = date.range(MONTH_OF_YEAR); assertEquals(monthRange.getMinimum(), minMonth, "Minimum month for HijrahDate"); assertEquals(monthRange.getMaximum(), maxMonth, "Maximum month for HijrahDate"); daysRange = date.range(DAY_OF_MONTH); assertEquals(daysRange.getMinimum(), minDay, "Minimum day for HijrahDate"); assertEquals(daysRange.getMaximum(), maxDay, "Maximum day for HijrahDate"); }
Example 5
Source File: TestUmmAlQuraChronology.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
@Test(dataProvider="dates") public void Test_UmmAlQuraRanges(HijrahDate date, int minYear, int maxYear, int minMonth, int maxMonth, int minDay, int maxDay, int maxChronoDay) { // Check the chronology ranges HijrahChronology chrono = date.getChronology(); ValueRange yearRange = chrono.range(YEAR); assertEquals(yearRange.getMinimum(), minYear, "Minimum year for Hijrah chronology"); assertEquals(yearRange.getLargestMinimum(), minYear, "Largest minimum year for Hijrah chronology"); assertEquals(yearRange.getMaximum(), maxYear, "Maximum year for Hijrah chronology"); assertEquals(yearRange.getSmallestMaximum(), maxYear, "Smallest Maximum year for Hijrah chronology"); ValueRange monthRange = chrono.range(MONTH_OF_YEAR); assertEquals(monthRange.getMinimum(), minMonth, "Minimum month for Hijrah chronology"); assertEquals(monthRange.getMaximum(), maxMonth, "Maximum month for Hijrah chronology"); ValueRange daysRange = chrono.range(DAY_OF_MONTH); assertEquals(daysRange.getMinimum(), minDay, "Minimum day for chronology"); assertEquals(daysRange.getMaximum(), maxChronoDay, "Maximum day for Hijrah chronology"); // Check the date ranges yearRange = date.range(YEAR); assertEquals(yearRange.getMinimum(), minYear, "Minimum year for Hijrah date"); assertEquals(yearRange.getLargestMinimum(), minYear, "Largest minimum year for Hijrah date"); assertEquals(yearRange.getMaximum(), maxYear, "Maximum year for Hijrah date"); assertEquals(yearRange.getSmallestMaximum(), maxYear, "Smallest maximum year for Hijrah date"); monthRange = date.range(MONTH_OF_YEAR); assertEquals(monthRange.getMinimum(), minMonth, "Minimum month for HijrahDate"); assertEquals(monthRange.getMaximum(), maxMonth, "Maximum month for HijrahDate"); daysRange = date.range(DAY_OF_MONTH); assertEquals(daysRange.getMinimum(), minDay, "Minimum day for HijrahDate"); assertEquals(daysRange.getMaximum(), maxDay, "Maximum day for HijrahDate"); }
Example 6
Source File: TestUmmAlQuraChronology.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
@Test(dataProvider="dates") public void Test_UmmAlQuraRanges(HijrahDate date, int minYear, int maxYear, int minMonth, int maxMonth, int minDay, int maxDay, int maxChronoDay) { // Check the chronology ranges HijrahChronology chrono = date.getChronology(); ValueRange yearRange = chrono.range(YEAR); assertEquals(yearRange.getMinimum(), minYear, "Minimum year for Hijrah chronology"); assertEquals(yearRange.getLargestMinimum(), minYear, "Largest minimum year for Hijrah chronology"); assertEquals(yearRange.getMaximum(), maxYear, "Maximum year for Hijrah chronology"); assertEquals(yearRange.getSmallestMaximum(), maxYear, "Smallest Maximum year for Hijrah chronology"); ValueRange monthRange = chrono.range(MONTH_OF_YEAR); assertEquals(monthRange.getMinimum(), minMonth, "Minimum month for Hijrah chronology"); assertEquals(monthRange.getMaximum(), maxMonth, "Maximum month for Hijrah chronology"); ValueRange daysRange = chrono.range(DAY_OF_MONTH); assertEquals(daysRange.getMinimum(), minDay, "Minimum day for chronology"); assertEquals(daysRange.getMaximum(), maxChronoDay, "Maximum day for Hijrah chronology"); // Check the date ranges yearRange = date.range(YEAR); assertEquals(yearRange.getMinimum(), minYear, "Minimum year for Hijrah date"); assertEquals(yearRange.getLargestMinimum(), minYear, "Largest minimum year for Hijrah date"); assertEquals(yearRange.getMaximum(), maxYear, "Maximum year for Hijrah date"); assertEquals(yearRange.getSmallestMaximum(), maxYear, "Smallest maximum year for Hijrah date"); monthRange = date.range(MONTH_OF_YEAR); assertEquals(monthRange.getMinimum(), minMonth, "Minimum month for HijrahDate"); assertEquals(monthRange.getMaximum(), maxMonth, "Maximum month for HijrahDate"); daysRange = date.range(DAY_OF_MONTH); assertEquals(daysRange.getMinimum(), minDay, "Minimum day for HijrahDate"); assertEquals(daysRange.getMaximum(), maxDay, "Maximum day for HijrahDate"); }
Example 7
Source File: TestUmmAlQuraChronology.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
@Test(dataProvider="dates") public void Test_UmmAlQuraRanges(HijrahDate date, int minYear, int maxYear, int minMonth, int maxMonth, int minDay, int maxDay, int maxChronoDay) { // Check the chronology ranges HijrahChronology chrono = date.getChronology(); ValueRange yearRange = chrono.range(YEAR); assertEquals(yearRange.getMinimum(), minYear, "Minimum year for Hijrah chronology"); assertEquals(yearRange.getLargestMinimum(), minYear, "Largest minimum year for Hijrah chronology"); assertEquals(yearRange.getMaximum(), maxYear, "Maximum year for Hijrah chronology"); assertEquals(yearRange.getSmallestMaximum(), maxYear, "Smallest Maximum year for Hijrah chronology"); ValueRange monthRange = chrono.range(MONTH_OF_YEAR); assertEquals(monthRange.getMinimum(), minMonth, "Minimum month for Hijrah chronology"); assertEquals(monthRange.getMaximum(), maxMonth, "Maximum month for Hijrah chronology"); ValueRange daysRange = chrono.range(DAY_OF_MONTH); assertEquals(daysRange.getMinimum(), minDay, "Minimum day for chronology"); assertEquals(daysRange.getMaximum(), maxChronoDay, "Maximum day for Hijrah chronology"); // Check the date ranges yearRange = date.range(YEAR); assertEquals(yearRange.getMinimum(), minYear, "Minimum year for Hijrah date"); assertEquals(yearRange.getLargestMinimum(), minYear, "Largest minimum year for Hijrah date"); assertEquals(yearRange.getMaximum(), maxYear, "Maximum year for Hijrah date"); assertEquals(yearRange.getSmallestMaximum(), maxYear, "Smallest maximum year for Hijrah date"); monthRange = date.range(MONTH_OF_YEAR); assertEquals(monthRange.getMinimum(), minMonth, "Minimum month for HijrahDate"); assertEquals(monthRange.getMaximum(), maxMonth, "Maximum month for HijrahDate"); daysRange = date.range(DAY_OF_MONTH); assertEquals(daysRange.getMinimum(), minDay, "Minimum day for HijrahDate"); assertEquals(daysRange.getMaximum(), maxDay, "Maximum day for HijrahDate"); }
Example 8
Source File: TestUmmAlQuraChronology.java From hottub with GNU General Public License v2.0 | 5 votes |
@Test(dataProvider="dates") public void Test_UmmAlQuraRanges(HijrahDate date, int minYear, int maxYear, int minMonth, int maxMonth, int minDay, int maxDay, int maxChronoDay) { // Check the chronology ranges HijrahChronology chrono = date.getChronology(); ValueRange yearRange = chrono.range(YEAR); assertEquals(yearRange.getMinimum(), minYear, "Minimum year for Hijrah chronology"); assertEquals(yearRange.getLargestMinimum(), minYear, "Largest minimum year for Hijrah chronology"); assertEquals(yearRange.getMaximum(), maxYear, "Maximum year for Hijrah chronology"); assertEquals(yearRange.getSmallestMaximum(), maxYear, "Smallest Maximum year for Hijrah chronology"); ValueRange monthRange = chrono.range(MONTH_OF_YEAR); assertEquals(monthRange.getMinimum(), minMonth, "Minimum month for Hijrah chronology"); assertEquals(monthRange.getMaximum(), maxMonth, "Maximum month for Hijrah chronology"); ValueRange daysRange = chrono.range(DAY_OF_MONTH); assertEquals(daysRange.getMinimum(), minDay, "Minimum day for chronology"); assertEquals(daysRange.getMaximum(), maxChronoDay, "Maximum day for Hijrah chronology"); // Check the date ranges yearRange = date.range(YEAR); assertEquals(yearRange.getMinimum(), minYear, "Minimum year for Hijrah date"); assertEquals(yearRange.getLargestMinimum(), minYear, "Largest minimum year for Hijrah date"); assertEquals(yearRange.getMaximum(), maxYear, "Maximum year for Hijrah date"); assertEquals(yearRange.getSmallestMaximum(), maxYear, "Smallest maximum year for Hijrah date"); monthRange = date.range(MONTH_OF_YEAR); assertEquals(monthRange.getMinimum(), minMonth, "Minimum month for HijrahDate"); assertEquals(monthRange.getMaximum(), maxMonth, "Maximum month for HijrahDate"); daysRange = date.range(DAY_OF_MONTH); assertEquals(daysRange.getMinimum(), minDay, "Minimum day for HijrahDate"); assertEquals(daysRange.getMaximum(), maxDay, "Maximum day for HijrahDate"); }
Example 9
Source File: TestUmmAlQuraChronology.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
@Test(dataProvider="dates") public void Test_UmmAlQuraRanges(HijrahDate date, int minYear, int maxYear, int minMonth, int maxMonth, int minDay, int maxDay, int maxChronoDay) { // Check the chronology ranges HijrahChronology chrono = date.getChronology(); ValueRange yearRange = chrono.range(YEAR); assertEquals(yearRange.getMinimum(), minYear, "Minimum year for Hijrah chronology"); assertEquals(yearRange.getLargestMinimum(), minYear, "Largest minimum year for Hijrah chronology"); assertEquals(yearRange.getMaximum(), maxYear, "Maximum year for Hijrah chronology"); assertEquals(yearRange.getSmallestMaximum(), maxYear, "Smallest Maximum year for Hijrah chronology"); ValueRange monthRange = chrono.range(MONTH_OF_YEAR); assertEquals(monthRange.getMinimum(), minMonth, "Minimum month for Hijrah chronology"); assertEquals(monthRange.getMaximum(), maxMonth, "Maximum month for Hijrah chronology"); ValueRange daysRange = chrono.range(DAY_OF_MONTH); assertEquals(daysRange.getMinimum(), minDay, "Minimum day for chronology"); assertEquals(daysRange.getMaximum(), maxChronoDay, "Maximum day for Hijrah chronology"); // Check the date ranges yearRange = date.range(YEAR); assertEquals(yearRange.getMinimum(), minYear, "Minimum year for Hijrah date"); assertEquals(yearRange.getLargestMinimum(), minYear, "Largest minimum year for Hijrah date"); assertEquals(yearRange.getMaximum(), maxYear, "Maximum year for Hijrah date"); assertEquals(yearRange.getSmallestMaximum(), maxYear, "Smallest maximum year for Hijrah date"); monthRange = date.range(MONTH_OF_YEAR); assertEquals(monthRange.getMinimum(), minMonth, "Minimum month for HijrahDate"); assertEquals(monthRange.getMaximum(), maxMonth, "Maximum month for HijrahDate"); daysRange = date.range(DAY_OF_MONTH); assertEquals(daysRange.getMinimum(), minDay, "Minimum day for HijrahDate"); assertEquals(daysRange.getMaximum(), maxDay, "Maximum day for HijrahDate"); }
Example 10
Source File: TestUmmAlQuraChronology.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
@Test(dataProvider="dates") public void Test_UmmAlQuraRanges(HijrahDate date, int minYear, int maxYear, int minMonth, int maxMonth, int minDay, int maxDay, int maxChronoDay) { // Check the chronology ranges HijrahChronology chrono = date.getChronology(); ValueRange yearRange = chrono.range(YEAR); assertEquals(yearRange.getMinimum(), minYear, "Minimum year for Hijrah chronology"); assertEquals(yearRange.getLargestMinimum(), minYear, "Largest minimum year for Hijrah chronology"); assertEquals(yearRange.getMaximum(), maxYear, "Maximum year for Hijrah chronology"); assertEquals(yearRange.getSmallestMaximum(), maxYear, "Smallest Maximum year for Hijrah chronology"); ValueRange monthRange = chrono.range(MONTH_OF_YEAR); assertEquals(monthRange.getMinimum(), minMonth, "Minimum month for Hijrah chronology"); assertEquals(monthRange.getMaximum(), maxMonth, "Maximum month for Hijrah chronology"); ValueRange daysRange = chrono.range(DAY_OF_MONTH); assertEquals(daysRange.getMinimum(), minDay, "Minimum day for chronology"); assertEquals(daysRange.getMaximum(), maxChronoDay, "Maximum day for Hijrah chronology"); // Check the date ranges yearRange = date.range(YEAR); assertEquals(yearRange.getMinimum(), minYear, "Minimum year for Hijrah date"); assertEquals(yearRange.getLargestMinimum(), minYear, "Largest minimum year for Hijrah date"); assertEquals(yearRange.getMaximum(), maxYear, "Maximum year for Hijrah date"); assertEquals(yearRange.getSmallestMaximum(), maxYear, "Smallest maximum year for Hijrah date"); monthRange = date.range(MONTH_OF_YEAR); assertEquals(monthRange.getMinimum(), minMonth, "Minimum month for HijrahDate"); assertEquals(monthRange.getMaximum(), maxMonth, "Maximum month for HijrahDate"); daysRange = date.range(DAY_OF_MONTH); assertEquals(daysRange.getMinimum(), minDay, "Minimum day for HijrahDate"); assertEquals(daysRange.getMaximum(), maxDay, "Maximum day for HijrahDate"); }
Example 11
Source File: TestUmmAlQuraChronology.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
@Test(dataProvider="dates") public void Test_UmmAlQuraRanges(HijrahDate date, int minYear, int maxYear, int minMonth, int maxMonth, int minDay, int maxDay, int maxChronoDay) { // Check the chronology ranges HijrahChronology chrono = date.getChronology(); ValueRange yearRange = chrono.range(YEAR); assertEquals(yearRange.getMinimum(), minYear, "Minimum year for Hijrah chronology"); assertEquals(yearRange.getLargestMinimum(), minYear, "Largest minimum year for Hijrah chronology"); assertEquals(yearRange.getMaximum(), maxYear, "Maximum year for Hijrah chronology"); assertEquals(yearRange.getSmallestMaximum(), maxYear, "Smallest Maximum year for Hijrah chronology"); ValueRange monthRange = chrono.range(MONTH_OF_YEAR); assertEquals(monthRange.getMinimum(), minMonth, "Minimum month for Hijrah chronology"); assertEquals(monthRange.getMaximum(), maxMonth, "Maximum month for Hijrah chronology"); ValueRange daysRange = chrono.range(DAY_OF_MONTH); assertEquals(daysRange.getMinimum(), minDay, "Minimum day for chronology"); assertEquals(daysRange.getMaximum(), maxChronoDay, "Maximum day for Hijrah chronology"); // Check the date ranges yearRange = date.range(YEAR); assertEquals(yearRange.getMinimum(), minYear, "Minimum year for Hijrah date"); assertEquals(yearRange.getLargestMinimum(), minYear, "Largest minimum year for Hijrah date"); assertEquals(yearRange.getMaximum(), maxYear, "Maximum year for Hijrah date"); assertEquals(yearRange.getSmallestMaximum(), maxYear, "Smallest maximum year for Hijrah date"); monthRange = date.range(MONTH_OF_YEAR); assertEquals(monthRange.getMinimum(), minMonth, "Minimum month for HijrahDate"); assertEquals(monthRange.getMaximum(), maxMonth, "Maximum month for HijrahDate"); daysRange = date.range(DAY_OF_MONTH); assertEquals(daysRange.getMinimum(), minDay, "Minimum day for HijrahDate"); assertEquals(daysRange.getMaximum(), maxDay, "Maximum day for HijrahDate"); }
Example 12
Source File: TestUmmAlQuraChronology.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
@Test(dataProvider="dates") public void Test_UmmAlQuraRanges(HijrahDate date, int minYear, int maxYear, int minMonth, int maxMonth, int minDay, int maxDay, int maxChronoDay) { // Check the chronology ranges HijrahChronology chrono = date.getChronology(); ValueRange yearRange = chrono.range(YEAR); assertEquals(yearRange.getMinimum(), minYear, "Minimum year for Hijrah chronology"); assertEquals(yearRange.getLargestMinimum(), minYear, "Largest minimum year for Hijrah chronology"); assertEquals(yearRange.getMaximum(), maxYear, "Maximum year for Hijrah chronology"); assertEquals(yearRange.getSmallestMaximum(), maxYear, "Smallest Maximum year for Hijrah chronology"); ValueRange monthRange = chrono.range(MONTH_OF_YEAR); assertEquals(monthRange.getMinimum(), minMonth, "Minimum month for Hijrah chronology"); assertEquals(monthRange.getMaximum(), maxMonth, "Maximum month for Hijrah chronology"); ValueRange daysRange = chrono.range(DAY_OF_MONTH); assertEquals(daysRange.getMinimum(), minDay, "Minimum day for chronology"); assertEquals(daysRange.getMaximum(), maxChronoDay, "Maximum day for Hijrah chronology"); // Check the date ranges yearRange = date.range(YEAR); assertEquals(yearRange.getMinimum(), minYear, "Minimum year for Hijrah date"); assertEquals(yearRange.getLargestMinimum(), minYear, "Largest minimum year for Hijrah date"); assertEquals(yearRange.getMaximum(), maxYear, "Maximum year for Hijrah date"); assertEquals(yearRange.getSmallestMaximum(), maxYear, "Smallest maximum year for Hijrah date"); monthRange = date.range(MONTH_OF_YEAR); assertEquals(monthRange.getMinimum(), minMonth, "Minimum month for HijrahDate"); assertEquals(monthRange.getMaximum(), maxMonth, "Maximum month for HijrahDate"); daysRange = date.range(DAY_OF_MONTH); assertEquals(daysRange.getMinimum(), minDay, "Minimum day for HijrahDate"); assertEquals(daysRange.getMaximum(), maxDay, "Maximum day for HijrahDate"); }
Example 13
Source File: TestUmmAlQuraChronology.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
@Test(dataProvider="dates") public void Test_UmmAlQuraRanges(HijrahDate date, int minYear, int maxYear, int minMonth, int maxMonth, int minDay, int maxDay, int maxChronoDay) { // Check the chronology ranges HijrahChronology chrono = date.getChronology(); ValueRange yearRange = chrono.range(YEAR); assertEquals(yearRange.getMinimum(), minYear, "Minimum year for Hijrah chronology"); assertEquals(yearRange.getLargestMinimum(), minYear, "Largest minimum year for Hijrah chronology"); assertEquals(yearRange.getMaximum(), maxYear, "Maximum year for Hijrah chronology"); assertEquals(yearRange.getSmallestMaximum(), maxYear, "Smallest Maximum year for Hijrah chronology"); ValueRange monthRange = chrono.range(MONTH_OF_YEAR); assertEquals(monthRange.getMinimum(), minMonth, "Minimum month for Hijrah chronology"); assertEquals(monthRange.getMaximum(), maxMonth, "Maximum month for Hijrah chronology"); ValueRange daysRange = chrono.range(DAY_OF_MONTH); assertEquals(daysRange.getMinimum(), minDay, "Minimum day for chronology"); assertEquals(daysRange.getMaximum(), maxChronoDay, "Maximum day for Hijrah chronology"); // Check the date ranges yearRange = date.range(YEAR); assertEquals(yearRange.getMinimum(), minYear, "Minimum year for Hijrah date"); assertEquals(yearRange.getLargestMinimum(), minYear, "Largest minimum year for Hijrah date"); assertEquals(yearRange.getMaximum(), maxYear, "Maximum year for Hijrah date"); assertEquals(yearRange.getSmallestMaximum(), maxYear, "Smallest maximum year for Hijrah date"); monthRange = date.range(MONTH_OF_YEAR); assertEquals(monthRange.getMinimum(), minMonth, "Minimum month for HijrahDate"); assertEquals(monthRange.getMaximum(), maxMonth, "Maximum month for HijrahDate"); daysRange = date.range(DAY_OF_MONTH); assertEquals(daysRange.getMinimum(), minDay, "Minimum day for HijrahDate"); assertEquals(daysRange.getMaximum(), maxDay, "Maximum day for HijrahDate"); }