コード例 #1
0
 public void testSetInto_Object_Chronology2() throws Exception {
   MutableInterval m = new MutableInterval(1000L, 2000L, GJChronology.getInstance());
   NullConverter.INSTANCE.setInto(m, null, CopticChronology.getInstance());
   assertEquals(TEST_TIME_NOW, m.getStartMillis());
   assertEquals(TEST_TIME_NOW, m.getEndMillis());
   assertEquals(CopticChronology.getInstance(), m.getChronology());
 }
コード例 #2
0
 // -----------------------------------------------------------------------
 public void testToString() {
   assertEquals("Converter[null]", NullConverter.INSTANCE.toString());
 }
コード例 #3
0
 public void testSetInto_Object() throws Exception {
   MutablePeriod m = new MutablePeriod(PeriodType.millis());
   NullConverter.INSTANCE.setInto(m, null, null);
   assertEquals(0L, m.getMillis());
 }
コード例 #4
0
 // -----------------------------------------------------------------------
 public void testIsReadableInterval_Object_Chronology() throws Exception {
   assertEquals(false, NullConverter.INSTANCE.isReadableInterval(null, null));
 }
コード例 #5
0
 // -----------------------------------------------------------------------
 public void testGetDurationMillis_Object() throws Exception {
   assertEquals(0L, NullConverter.INSTANCE.getDurationMillis(null));
 }
コード例 #6
0
 // -----------------------------------------------------------------------
 public void testGetPeriodType_Object() throws Exception {
   assertEquals(PeriodType.standard(), NullConverter.INSTANCE.getPeriodType(null));
 }
コード例 #7
0
 // -----------------------------------------------------------------------
 public void testGetPartialValues() throws Exception {
   TimeOfDay tod = new TimeOfDay();
   int[] expected = new int[] {10 + 1, 20, 30, 40}; // now
   int[] actual = NullConverter.INSTANCE.getPartialValues(tod, null, ISOChronology.getInstance());
   assertEquals(true, Arrays.equals(expected, actual));
 }
コード例 #8
0
 public void testGetChronology_Object_Chronology() throws Exception {
   assertEquals(JULIAN, NullConverter.INSTANCE.getChronology(null, JULIAN));
   assertEquals(ISO, NullConverter.INSTANCE.getChronology(null, (Chronology) null));
 }
コード例 #9
0
 // -----------------------------------------------------------------------
 public void testGetChronology_Object_Zone() throws Exception {
   assertEquals(ISO_PARIS, NullConverter.INSTANCE.getChronology(null, PARIS));
   assertEquals(ISO, NullConverter.INSTANCE.getChronology(null, (DateTimeZone) null));
 }
コード例 #10
0
 // -----------------------------------------------------------------------
 public void testGetInstantMillis_Object_Chronology() throws Exception {
   assertEquals(TEST_TIME_NOW, NullConverter.INSTANCE.getInstantMillis(null, JULIAN));
   assertEquals(TEST_TIME_NOW, NullConverter.INSTANCE.getInstantMillis(null, (Chronology) null));
 }
コード例 #11
0
 // -----------------------------------------------------------------------
 public void testSupportedType() throws Exception {
   assertEquals(null, NullConverter.INSTANCE.getSupportedType());
 }