Search in sources :

Example 1 with MonthDay

use of java.time.MonthDay in project jdk8u_jdk by JetBrains.

the class TCKMonthDay method test_withDayOfMonth_noChangeEqual.

@Test
public void test_withDayOfMonth_noChangeEqual() {
    MonthDay test = MonthDay.of(6, 30);
    assertEquals(test.withDayOfMonth(30), test);
}
Also used : MonthDay(java.time.MonthDay) Test(org.testng.annotations.Test)

Example 2 with MonthDay

use of java.time.MonthDay in project jdk8u_jdk by JetBrains.

the class TCKMonthDay method test_adjustDate_resolve.

@Test
public void test_adjustDate_resolve() {
    MonthDay test = MonthDay.of(2, 29);
    LocalDate date = LocalDate.of(2007, 6, 30);
    assertEquals(test.adjustInto(date), LocalDate.of(2007, 2, 28));
}
Also used : MonthDay(java.time.MonthDay) LocalDate(java.time.LocalDate) Test(org.testng.annotations.Test)

Example 3 with MonthDay

use of java.time.MonthDay in project jdk8u_jdk by JetBrains.

the class TCKMonthDay method test_isValidYear_june.

//-----------------------------------------------------------------------
// isValidYear(int)
//-----------------------------------------------------------------------
@Test
public void test_isValidYear_june() {
    MonthDay test = MonthDay.of(6, 30);
    assertEquals(test.isValidYear(2007), true);
}
Also used : MonthDay(java.time.MonthDay) Test(org.testng.annotations.Test)

Example 4 with MonthDay

use of java.time.MonthDay in project jdk8u_jdk by JetBrains.

the class TCKMonthDay method test_atYear_int_leapYearAdjust.

@Test
public void test_atYear_int_leapYearAdjust() {
    MonthDay test = MonthDay.of(2, 29);
    assertEquals(test.atYear(2005), LocalDate.of(2005, 2, 28));
}
Also used : MonthDay(java.time.MonthDay) Test(org.testng.annotations.Test)

Example 5 with MonthDay

use of java.time.MonthDay in project jdk8u_jdk by JetBrains.

the class TCKMonthDay method test_isValidYear_febLeap.

@Test
public void test_isValidYear_febLeap() {
    MonthDay test = MonthDay.of(2, 29);
    assertEquals(test.isValidYear(2008), true);
}
Also used : MonthDay(java.time.MonthDay) Test(org.testng.annotations.Test)

Aggregations

MonthDay (java.time.MonthDay)59 Test (org.junit.Test)27 Test (org.testng.annotations.Test)25 LocalDate (java.time.LocalDate)9 UseDataProvider (com.tngtech.java.junit.dataprovider.UseDataProvider)4 DateTimeFormatter (java.time.format.DateTimeFormatter)3 Clock (java.time.Clock)2 Instant (java.time.Instant)2 ZoneId (java.time.ZoneId)2 Cache (com.google.common.cache.Cache)1 CacheBuilder (com.google.common.cache.CacheBuilder)1 Subscribe (com.google.common.eventbus.Subscribe)1 IOException (java.io.IOException)1 YearMonth (java.time.YearMonth)1 java.util (java.util)1 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)1 Collectors (java.util.stream.Collectors)1 JDOUserException (javax.jdo.JDOUserException)1 PersistenceManager (javax.jdo.PersistenceManager)1 Transaction (javax.jdo.Transaction)1