Java Code Examples for java.time.chrono.MinguoDate#with()

The following examples show how to use java.time.chrono.MinguoDate#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: TCKMinguoChronology.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
@Test
public void test_adjust_toLocalDate() {
    MinguoDate minguo = MinguoChronology.INSTANCE.date(99, 1, 4);
    MinguoDate test = minguo.with(LocalDate.of(2012, 7, 6));
    assertEquals(test, MinguoChronology.INSTANCE.date(101, 7, 6));
}
 
Example 2
Source File: TCKMinguoChronology.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
@Test(expectedExceptions=DateTimeException.class)
public void test_adjust_toMonth() {
    MinguoDate minguo = MinguoChronology.INSTANCE.date(1726, 1, 4);
    minguo.with(Month.APRIL);
}
 
Example 3
Source File: TCKMinguoChronology.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
@Test
public void test_adjust_toLocalDate() {
    MinguoDate minguo = MinguoChronology.INSTANCE.date(99, 1, 4);
    MinguoDate test = minguo.with(LocalDate.of(2012, 7, 6));
    assertEquals(test, MinguoChronology.INSTANCE.date(101, 7, 6));
}
 
Example 4
Source File: TCKMinguoChronology.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
@Test
public void test_adjust2() {
    MinguoDate base = MinguoChronology.INSTANCE.date(1728, 12, 2);
    MinguoDate test = base.with(TemporalAdjusters.lastDayOfMonth());
    assertEquals(test, MinguoChronology.INSTANCE.date(1728, 12, 31));
}
 
Example 5
Source File: TCKMinguoChronology.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
@Test
public void test_adjust2() {
    MinguoDate base = MinguoChronology.INSTANCE.date(1728, 12, 2);
    MinguoDate test = base.with(TemporalAdjusters.lastDayOfMonth());
    assertEquals(test, MinguoChronology.INSTANCE.date(1728, 12, 31));
}
 
Example 6
Source File: TCKMinguoChronology.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
@Test(expectedExceptions=DateTimeException.class)
public void test_adjust_toMonth() {
    MinguoDate minguo = MinguoChronology.INSTANCE.date(1726, 1, 4);
    minguo.with(Month.APRIL);
}
 
Example 7
Source File: TCKMinguoChronology.java    From jdk8u-dev-jdk with GNU General Public License v2.0 4 votes vote down vote up
@Test
public void test_adjust2() {
    MinguoDate base = MinguoChronology.INSTANCE.date(1728, 12, 2);
    MinguoDate test = base.with(TemporalAdjusters.lastDayOfMonth());
    assertEquals(test, MinguoChronology.INSTANCE.date(1728, 12, 31));
}
 
Example 8
Source File: TCKMinguoChronology.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
@Test
public void test_adjust1() {
    MinguoDate base = MinguoChronology.INSTANCE.date(2012, 10, 29);
    MinguoDate test = base.with(TemporalAdjusters.lastDayOfMonth());
    assertEquals(test, MinguoChronology.INSTANCE.date(2012, 10, 31));
}
 
Example 9
Source File: TCKMinguoChronology.java    From jdk8u_jdk with GNU General Public License v2.0 4 votes vote down vote up
@Test(expectedExceptions=DateTimeException.class)
public void test_adjust_toMonth() {
    MinguoDate minguo = MinguoChronology.INSTANCE.date(1726, 1, 4);
    minguo.with(Month.APRIL);
}
 
Example 10
Source File: TCKMinguoChronology.java    From jdk8u-dev-jdk with GNU General Public License v2.0 4 votes vote down vote up
@Test
public void test_adjust1() {
    MinguoDate base = MinguoChronology.INSTANCE.date(2012, 10, 29);
    MinguoDate test = base.with(TemporalAdjusters.lastDayOfMonth());
    assertEquals(test, MinguoChronology.INSTANCE.date(2012, 10, 31));
}
 
Example 11
Source File: TCKMinguoChronology.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
@Test
public void test_adjust2() {
    MinguoDate base = MinguoChronology.INSTANCE.date(1728, 12, 2);
    MinguoDate test = base.with(TemporalAdjusters.lastDayOfMonth());
    assertEquals(test, MinguoChronology.INSTANCE.date(1728, 12, 31));
}
 
Example 12
Source File: TCKMinguoChronology.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
@Test
public void test_adjust_toLocalDate() {
    MinguoDate minguo = MinguoChronology.INSTANCE.date(99, 1, 4);
    MinguoDate test = minguo.with(LocalDate.of(2012, 7, 6));
    assertEquals(test, MinguoChronology.INSTANCE.date(101, 7, 6));
}
 
Example 13
Source File: TCKMinguoChronology.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
@Test
public void test_adjust1() {
    MinguoDate base = MinguoChronology.INSTANCE.date(2012, 10, 29);
    MinguoDate test = base.with(TemporalAdjusters.lastDayOfMonth());
    assertEquals(test, MinguoChronology.INSTANCE.date(2012, 10, 31));
}
 
Example 14
Source File: TCKMinguoChronology.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
@Test(expectedExceptions=DateTimeException.class)
public void test_adjust_toMonth() {
    MinguoDate minguo = MinguoChronology.INSTANCE.date(1726, 1, 4);
    minguo.with(Month.APRIL);
}
 
Example 15
Source File: TCKMinguoChronology.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
@Test
public void test_adjust_toLocalDate() {
    MinguoDate minguo = MinguoChronology.INSTANCE.date(99, 1, 4);
    MinguoDate test = minguo.with(LocalDate.of(2012, 7, 6));
    assertEquals(test, MinguoChronology.INSTANCE.date(101, 7, 6));
}
 
Example 16
Source File: TCKMinguoChronology.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
@Test
public void test_adjust2() {
    MinguoDate base = MinguoChronology.INSTANCE.date(1728, 12, 2);
    MinguoDate test = base.with(TemporalAdjusters.lastDayOfMonth());
    assertEquals(test, MinguoChronology.INSTANCE.date(1728, 12, 31));
}
 
Example 17
Source File: TCKMinguoChronology.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
@Test
public void test_adjust1() {
    MinguoDate base = MinguoChronology.INSTANCE.date(2012, 10, 29);
    MinguoDate test = base.with(TemporalAdjusters.lastDayOfMonth());
    assertEquals(test, MinguoChronology.INSTANCE.date(2012, 10, 31));
}
 
Example 18
Source File: TCKMinguoChronology.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
@Test
public void test_adjust2() {
    MinguoDate base = MinguoChronology.INSTANCE.date(1728, 12, 2);
    MinguoDate test = base.with(TemporalAdjusters.lastDayOfMonth());
    assertEquals(test, MinguoChronology.INSTANCE.date(1728, 12, 31));
}
 
Example 19
Source File: TCKMinguoChronology.java    From dragonwell8_jdk with GNU General Public License v2.0 4 votes vote down vote up
@Test
public void test_adjust_toLocalDate() {
    MinguoDate minguo = MinguoChronology.INSTANCE.date(99, 1, 4);
    MinguoDate test = minguo.with(LocalDate.of(2012, 7, 6));
    assertEquals(test, MinguoChronology.INSTANCE.date(101, 7, 6));
}
 
Example 20
Source File: TCKMinguoChronology.java    From jdk8u_jdk with GNU General Public License v2.0 4 votes vote down vote up
@Test
public void test_adjust_toLocalDate() {
    MinguoDate minguo = MinguoChronology.INSTANCE.date(99, 1, 4);
    MinguoDate test = minguo.with(LocalDate.of(2012, 7, 6));
    assertEquals(test, MinguoChronology.INSTANCE.date(101, 7, 6));
}