Java Code Examples for java.time.chrono.ThaiBuddhistDate#with()
The following examples show how to use
java.time.chrono.ThaiBuddhistDate#with() .
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: TCKThaiBuddhistChronology.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions=DateTimeException.class) public void test_adjust_toMonth() { ThaiBuddhistDate jdate = ThaiBuddhistChronology.INSTANCE.date(1726, 1, 4); jdate.with(Month.APRIL); }
Example 2
Source File: TCKThaiBuddhistChronology.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
@Test public void test_withEra_swap() { ThaiBuddhistDate base = ThaiBuddhistChronology.INSTANCE.date(-2554, 8, 29); ThaiBuddhistDate test = base.with(ChronoField.ERA, ThaiBuddhistEra.BE.getValue()); assertEquals(test, ThaiBuddhistChronology.INSTANCE.date(2555, 8, 29)); }
Example 3
Source File: TCKThaiBuddhistChronology.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions=DateTimeException.class) public void test_adjust_toMonth() { ThaiBuddhistDate jdate = ThaiBuddhistChronology.INSTANCE.date(1726, 1, 4); jdate.with(Month.APRIL); }
Example 4
Source File: TCKThaiBuddhistChronology.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
@Test public void test_adjust1() { ThaiBuddhistDate base = ThaiBuddhistChronology.INSTANCE.date(1728, 10, 29); ThaiBuddhistDate test = base.with(TemporalAdjusters.lastDayOfMonth()); assertEquals(test, ThaiBuddhistChronology.INSTANCE.date(1728, 10, 31)); }
Example 5
Source File: TCKThaiBuddhistChronology.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
@Test public void test_adjust_toLocalDate() { ThaiBuddhistDate jdate = ThaiBuddhistChronology.INSTANCE.date(1726, 1, 4); ThaiBuddhistDate test = jdate.with(LocalDate.of(2012, 7, 6)); assertEquals(test, ThaiBuddhistChronology.INSTANCE.date(2555, 7, 6)); }
Example 6
Source File: TCKThaiBuddhistChronology.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 4 votes |
@Test public void test_withEra_BBE() { ThaiBuddhistDate base = ThaiBuddhistChronology.INSTANCE.date(-2554, 8, 29); ThaiBuddhistDate test = base.with(ChronoField.ERA, ThaiBuddhistEra.BEFORE_BE.getValue()); assertEquals(test, ThaiBuddhistChronology.INSTANCE.date(-2554, 8, 29)); }
Example 7
Source File: TCKThaiBuddhistChronology.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
@Test public void test_withEra_BBE() { ThaiBuddhistDate base = ThaiBuddhistChronology.INSTANCE.date(-2554, 8, 29); ThaiBuddhistDate test = base.with(ChronoField.ERA, ThaiBuddhistEra.BEFORE_BE.getValue()); assertEquals(test, ThaiBuddhistChronology.INSTANCE.date(-2554, 8, 29)); }
Example 8
Source File: TCKThaiBuddhistChronology.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
@Test public void test_withEra_BE() { ThaiBuddhistDate base = ThaiBuddhistChronology.INSTANCE.date(2555, 8, 29); ThaiBuddhistDate test = base.with(ChronoField.ERA, ThaiBuddhistEra.BE.getValue()); assertEquals(test, ThaiBuddhistChronology.INSTANCE.date(2555, 8, 29)); }
Example 9
Source File: TCKThaiBuddhistChronology.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
@Test public void test_withYear_BBE() { ThaiBuddhistDate base = ThaiBuddhistChronology.INSTANCE.date(-2554, 8, 29); ThaiBuddhistDate test = base.with(YEAR_OF_ERA, 2554); assertEquals(test, ThaiBuddhistChronology.INSTANCE.date(-2553, 8, 29)); }
Example 10
Source File: TCKThaiBuddhistChronology.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
@Test public void test_adjust1() { ThaiBuddhistDate base = ThaiBuddhistChronology.INSTANCE.date(1728, 10, 29); ThaiBuddhistDate test = base.with(TemporalAdjusters.lastDayOfMonth()); assertEquals(test, ThaiBuddhistChronology.INSTANCE.date(1728, 10, 31)); }
Example 11
Source File: TCKThaiBuddhistChronology.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions=DateTimeException.class) public void test_adjust_toMonth() { ThaiBuddhistDate jdate = ThaiBuddhistChronology.INSTANCE.date(1726, 1, 4); jdate.with(Month.APRIL); }
Example 12
Source File: TCKThaiBuddhistChronology.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
@Test public void test_adjust1() { ThaiBuddhistDate base = ThaiBuddhistChronology.INSTANCE.date(1728, 10, 29); ThaiBuddhistDate test = base.with(TemporalAdjusters.lastDayOfMonth()); assertEquals(test, ThaiBuddhistChronology.INSTANCE.date(1728, 10, 31)); }
Example 13
Source File: TCKThaiBuddhistChronology.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
@Test public void test_withYear_BE() { ThaiBuddhistDate base = ThaiBuddhistChronology.INSTANCE.date(2555, 8, 29); ThaiBuddhistDate test = base.with(YEAR, 2554); assertEquals(test, ThaiBuddhistChronology.INSTANCE.date(2554, 8, 29)); }
Example 14
Source File: TCKThaiBuddhistChronology.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
@Test public void test_withEra_BE() { ThaiBuddhistDate base = ThaiBuddhistChronology.INSTANCE.date(2555, 8, 29); ThaiBuddhistDate test = base.with(ChronoField.ERA, ThaiBuddhistEra.BE.getValue()); assertEquals(test, ThaiBuddhistChronology.INSTANCE.date(2555, 8, 29)); }
Example 15
Source File: TCKThaiBuddhistChronology.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
@Test public void test_withEra_BBE() { ThaiBuddhistDate base = ThaiBuddhistChronology.INSTANCE.date(-2554, 8, 29); ThaiBuddhistDate test = base.with(ChronoField.ERA, ThaiBuddhistEra.BEFORE_BE.getValue()); assertEquals(test, ThaiBuddhistChronology.INSTANCE.date(-2554, 8, 29)); }
Example 16
Source File: TCKThaiBuddhistChronology.java From dragonwell8_jdk with GNU General Public License v2.0 | 4 votes |
@Test public void test_withEra_BBE() { ThaiBuddhistDate base = ThaiBuddhistChronology.INSTANCE.date(-2554, 8, 29); ThaiBuddhistDate test = base.with(ChronoField.ERA, ThaiBuddhistEra.BEFORE_BE.getValue()); assertEquals(test, ThaiBuddhistChronology.INSTANCE.date(-2554, 8, 29)); }
Example 17
Source File: TCKThaiBuddhistChronology.java From dragonwell8_jdk with GNU General Public License v2.0 | 4 votes |
@Test public void test_withEra_BE() { ThaiBuddhistDate base = ThaiBuddhistChronology.INSTANCE.date(2555, 8, 29); ThaiBuddhistDate test = base.with(ChronoField.ERA, ThaiBuddhistEra.BE.getValue()); assertEquals(test, ThaiBuddhistChronology.INSTANCE.date(2555, 8, 29)); }
Example 18
Source File: TCKThaiBuddhistChronology.java From hottub with GNU General Public License v2.0 | 4 votes |
@Test public void test_adjust_toLocalDate() { ThaiBuddhistDate jdate = ThaiBuddhistChronology.INSTANCE.date(1726, 1, 4); ThaiBuddhistDate test = jdate.with(LocalDate.of(2012, 7, 6)); assertEquals(test, ThaiBuddhistChronology.INSTANCE.date(2555, 7, 6)); }
Example 19
Source File: TCKThaiBuddhistChronology.java From jdk8u_jdk with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions=DateTimeException.class) public void test_adjust_toMonth() { ThaiBuddhistDate jdate = ThaiBuddhistChronology.INSTANCE.date(1726, 1, 4); jdate.with(Month.APRIL); }
Example 20
Source File: TCKThaiBuddhistChronology.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
@Test public void test_withEra_swap() { ThaiBuddhistDate base = ThaiBuddhistChronology.INSTANCE.date(-2554, 8, 29); ThaiBuddhistDate test = base.with(ChronoField.ERA, ThaiBuddhistEra.BE.getValue()); assertEquals(test, ThaiBuddhistChronology.INSTANCE.date(2555, 8, 29)); }