Package java.time.chrono

Examples of java.time.chrono.ChronoLocalDate


    assertFalse( constraint.isValid( past, null ), "Past MinguoDate '" + past + "' validated as future.");
  }

  @Test
  public void testIsValidForThaiBuddhistDate() {
    ChronoLocalDate future = ThaiBuddhistDate.now().plus( 1, DAYS );
    ChronoLocalDate past = ThaiBuddhistDate.now().minus( 1, DAYS );

    assertTrue( constraint.isValid( future, null ), "Future ThaiBuddhistDate '" + future + "' fails validation.");
    assertFalse( constraint.isValid( past, null ), "Past ThaiBuddhistDate '" + past + "' validated as future.");
  }
View Full Code Here


    assertTrue( constraint.isValid( null, null ), "null fails validation." );
  }

  @Test
  public void testIsValidForLocalDate() {
    ChronoLocalDate future = LocalDate.now().plusDays( 1 );
    ChronoLocalDate past = LocalDate.now().minusDays( 1 );

    assertTrue( constraint.isValid( past, null ), "Past LocalDate '" + past + "' fails validation.");
    assertFalse( constraint.isValid( future, null ), "Future LocalDate '" + future + "' validated as past.");
  }
View Full Code Here

    assertFalse( constraint.isValid( future, null ), "Future LocalDate '" + future + "' validated as past.");
  }

  @Test
  public void testIsValidForJapaneseDate() {
    ChronoLocalDate future = JapaneseDate.now().plus( 1, DAYS );
    ChronoLocalDate past = JapaneseDate.now().minus( 1, DAYS );

    assertTrue( constraint.isValid( past, null ), "Past JapaneseDate '" + past + "' fails validation.");
    assertFalse( constraint.isValid( future, null ), "Future JapaneseDate '" + future + "' validated as past.");
  }
View Full Code Here

    assertFalse( constraint.isValid( future, null ), "Future JapaneseDate '" + future + "' validated as past.");
  }

  @Test
  public void testIsValidForHijrahDate() {
    ChronoLocalDate future = HijrahDate.now().plus( 1, DAYS );
    ChronoLocalDate past = HijrahDate.now().minus( 1, DAYS );

    assertTrue( constraint.isValid( past, null ), "Past HijrahDate '" + past + "' fails validation.");
    assertFalse( constraint.isValid( future, null ), "Future HijrahDate '" + future + "' validated as past.");
  }
View Full Code Here

    assertFalse( constraint.isValid( future, null ), "Future HijrahDate '" + future + "' validated as past.");
  }

  @Test
  public void testIsValidForMinguoDate() {
    ChronoLocalDate future = MinguoDate.now().plus( 1, DAYS );
    ChronoLocalDate past = MinguoDate.now().minus( 1, DAYS );

    assertTrue( constraint.isValid( past, null ), "Past MinguoDate '" + past + "' fails validation.");
    assertFalse( constraint.isValid( future, null ), "Future MinguoDate '" + future + "' validated as past.");
  }
View Full Code Here

    assertFalse( constraint.isValid( future, null ), "Future MinguoDate '" + future + "' validated as past.");
  }

  @Test
  public void testIsValidForThaiBuddhistDate() {
    ChronoLocalDate future = ThaiBuddhistDate.now().plus( 1, DAYS );
    ChronoLocalDate past = ThaiBuddhistDate.now().minus( 1, DAYS );

    assertTrue( constraint.isValid( past, null ), "Past ThaiBuddhistDate '" + past + "' fails validation.");
    assertFalse( constraint.isValid( future, null ), "Future ThaiBuddhistDate '" + future + "' validated as past.");
  }
View Full Code Here

TOP

Related Classes of java.time.chrono.ChronoLocalDate

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.