Java 类org.joda.time.chrono.CopticChronology 实例源码

项目:astor    文件:TestYearMonthDay_Properties.java   
public void testPropertyEquals() {
    YearMonthDay test1 = new YearMonthDay(2005, 11, 8);
    YearMonthDay test2 = new YearMonthDay(2005, 11, 9);
    YearMonthDay test3 = new YearMonthDay(2005, 11, 8, CopticChronology.getInstanceUTC());
    assertEquals(false, test1.dayOfMonth().equals(test1.year()));
    assertEquals(false, test1.dayOfMonth().equals(test1.monthOfYear()));
    assertEquals(true, test1.dayOfMonth().equals(test1.dayOfMonth()));
    assertEquals(false, test1.dayOfMonth().equals(test2.year()));
    assertEquals(false, test1.dayOfMonth().equals(test2.monthOfYear()));
    assertEquals(false, test1.dayOfMonth().equals(test2.dayOfMonth()));

    assertEquals(false, test1.monthOfYear().equals(test1.year()));
    assertEquals(true, test1.monthOfYear().equals(test1.monthOfYear()));
    assertEquals(false, test1.monthOfYear().equals(test1.dayOfMonth()));
    assertEquals(false, test1.monthOfYear().equals(test2.year()));
    assertEquals(true, test1.monthOfYear().equals(test2.monthOfYear()));
    assertEquals(false, test1.monthOfYear().equals(test2.dayOfMonth()));

    assertEquals(false, test1.dayOfMonth().equals(null));
    assertEquals(false, test1.dayOfMonth().equals("any"));

    // chrono
    assertEquals(false, test1.dayOfMonth().equals(test3.dayOfMonth()));
}
项目:astor    文件:TestDurationFieldType.java   
public void test_other() throws Exception {
    assertEquals(1, DurationFieldType.class.getDeclaredClasses().length);
    Class cls = DurationFieldType.class.getDeclaredClasses()[0];
    assertEquals(1, cls.getDeclaredConstructors().length);
    Constructor con = cls.getDeclaredConstructors()[0];
    Object[] params = new Object[] {"other", new Byte((byte) 128)};
    DurationFieldType type = (DurationFieldType) con.newInstance(params);

    assertEquals("other", type.getName());
    try {
        type.getField(CopticChronology.getInstanceUTC());
        fail();
    } catch (InternalError ex) {}
    DurationFieldType result = doSerialization(type);
    assertEquals(type.getName(), result.getName());
    assertNotSame(type, result);
}
项目:astor    文件:TestDateTimeFieldType.java   
public void test_other() throws Exception {
    assertEquals(1, DateTimeFieldType.class.getDeclaredClasses().length);
    Class cls = DateTimeFieldType.class.getDeclaredClasses()[0];
    assertEquals(1, cls.getDeclaredConstructors().length);
    Constructor con = cls.getDeclaredConstructors()[0];
    Object[] params = new Object[] {
        "other", new Byte((byte) 128), DurationFieldType.hours(), DurationFieldType.months()};
    con.setAccessible(true);  // for Apache Harmony JVM
    DateTimeFieldType type = (DateTimeFieldType) con.newInstance(params);

    assertEquals("other", type.getName());
    assertSame(DurationFieldType.hours(), type.getDurationType());
    assertSame(DurationFieldType.months(), type.getRangeDurationType());
    try {
        type.getField(CopticChronology.getInstanceUTC());
        fail();
    } catch (InternalError ex) {}
    DateTimeFieldType result = doSerialization(type);
    assertEquals(type.getName(), result.getName());
    assertNotSame(type, result);
}
项目:astor    文件:TestMonthDay_Properties.java   
public void testPropertyEquals() {
    MonthDay test1 = new MonthDay(11, 11);
    MonthDay test2 = new MonthDay(11, 12);
    MonthDay test3 = new MonthDay(11, 11, CopticChronology.getInstanceUTC());
    assertEquals(true, test1.dayOfMonth().equals(test1.dayOfMonth()));
    assertEquals(false, test1.dayOfMonth().equals(test1.monthOfYear()));
    assertEquals(false, test1.dayOfMonth().equals(test2.dayOfMonth()));
    assertEquals(false, test1.dayOfMonth().equals(test2.monthOfYear()));

    assertEquals(false, test1.monthOfYear().equals(test1.dayOfMonth()));
    assertEquals(true, test1.monthOfYear().equals(test1.monthOfYear()));
    assertEquals(false, test1.monthOfYear().equals(test2.dayOfMonth()));
    assertEquals(true, test1.monthOfYear().equals(test2.monthOfYear()));

    assertEquals(false, test1.dayOfMonth().equals(null));
    assertEquals(false, test1.dayOfMonth().equals("any"));

    // chrono
    assertEquals(false, test1.dayOfMonth().equals(test3.dayOfMonth()));
}
项目:astor    文件:TestChronology.java   
public void testToString() {
    DateTimeZone paris = DateTimeZone.forID("Europe/Paris");
    ISOChronology isoParis = ISOChronology.getInstance(paris);

    assertEquals("ISOChronology[Europe/Paris]", isoParis.toString());
    assertEquals("GJChronology[Europe/Paris]", GJChronology.getInstance(paris).toString());
    assertEquals("GregorianChronology[Europe/Paris]", GregorianChronology.getInstance(paris).toString());
    assertEquals("JulianChronology[Europe/Paris]", JulianChronology.getInstance(paris).toString());
    assertEquals("BuddhistChronology[Europe/Paris]", BuddhistChronology.getInstance(paris).toString());
    assertEquals("CopticChronology[Europe/Paris]", CopticChronology.getInstance(paris).toString());
    assertEquals("EthiopicChronology[Europe/Paris]", EthiopicChronology.getInstance(paris).toString());
    assertEquals("IslamicChronology[Europe/Paris]", IslamicChronology.getInstance(paris).toString());

    assertEquals("LenientChronology[ISOChronology[Europe/Paris]]", LenientChronology.getInstance(isoParis).toString());
    assertEquals("StrictChronology[ISOChronology[Europe/Paris]]", StrictChronology.getInstance(isoParis).toString());
    assertEquals("LimitChronology[ISOChronology[Europe/Paris], NoLimit, NoLimit]", LimitChronology.getInstance(isoParis, null, null).toString());
    assertEquals("ZonedChronology[ISOChronology[UTC], Europe/Paris]", ZonedChronology.getInstance(isoParis, paris).toString());
}
项目:astor    文件:TestDurationFieldType.java   
public void test_other() throws Exception {
    assertEquals(1, DurationFieldType.class.getDeclaredClasses().length);
    Class cls = DurationFieldType.class.getDeclaredClasses()[0];
    assertEquals(1, cls.getDeclaredConstructors().length);
    Constructor con = cls.getDeclaredConstructors()[0];
    Object[] params = new Object[] {"other", new Byte((byte) 128)};
    DurationFieldType type = (DurationFieldType) con.newInstance(params);

    assertEquals("other", type.getName());
    try {
        type.getField(CopticChronology.getInstanceUTC());
        fail();
    } catch (InternalError ex) {}
    DurationFieldType result = doSerialization(type);
    assertEquals(type.getName(), result.getName());
    assertNotSame(type, result);
}
项目:astor    文件:TestLocalDate_Properties.java   
public void testPropertyEquals() {
    LocalDate test1 = new LocalDate(2005, 11, 8);
    LocalDate test2 = new LocalDate(2005, 11, 9);
    LocalDate test3 = new LocalDate(2005, 11, 8, CopticChronology.getInstanceUTC());
    assertEquals(false, test1.dayOfMonth().equals(test1.year()));
    assertEquals(false, test1.dayOfMonth().equals(test1.monthOfYear()));
    assertEquals(true, test1.dayOfMonth().equals(test1.dayOfMonth()));
    assertEquals(false, test1.dayOfMonth().equals(test2.year()));
    assertEquals(false, test1.dayOfMonth().equals(test2.monthOfYear()));
    assertEquals(false, test1.dayOfMonth().equals(test2.dayOfMonth()));

    assertEquals(false, test1.monthOfYear().equals(test1.year()));
    assertEquals(true, test1.monthOfYear().equals(test1.monthOfYear()));
    assertEquals(false, test1.monthOfYear().equals(test1.dayOfMonth()));
    assertEquals(false, test1.monthOfYear().equals(test2.year()));
    assertEquals(true, test1.monthOfYear().equals(test2.monthOfYear()));
    assertEquals(false, test1.monthOfYear().equals(test2.dayOfMonth()));

    assertEquals(false, test1.dayOfMonth().equals(null));
    assertEquals(false, test1.dayOfMonth().equals("any"));

    // chrono
    assertEquals(false, test1.dayOfMonth().equals(test3.dayOfMonth()));
}
项目:astor    文件:TestYearMonthDay_Properties.java   
public void testPropertyEquals() {
    YearMonthDay test1 = new YearMonthDay(2005, 11, 8);
    YearMonthDay test2 = new YearMonthDay(2005, 11, 9);
    YearMonthDay test3 = new YearMonthDay(2005, 11, 8, CopticChronology.getInstanceUTC());
    assertEquals(false, test1.dayOfMonth().equals(test1.year()));
    assertEquals(false, test1.dayOfMonth().equals(test1.monthOfYear()));
    assertEquals(true, test1.dayOfMonth().equals(test1.dayOfMonth()));
    assertEquals(false, test1.dayOfMonth().equals(test2.year()));
    assertEquals(false, test1.dayOfMonth().equals(test2.monthOfYear()));
    assertEquals(false, test1.dayOfMonth().equals(test2.dayOfMonth()));

    assertEquals(false, test1.monthOfYear().equals(test1.year()));
    assertEquals(true, test1.monthOfYear().equals(test1.monthOfYear()));
    assertEquals(false, test1.monthOfYear().equals(test1.dayOfMonth()));
    assertEquals(false, test1.monthOfYear().equals(test2.year()));
    assertEquals(true, test1.monthOfYear().equals(test2.monthOfYear()));
    assertEquals(false, test1.monthOfYear().equals(test2.dayOfMonth()));

    assertEquals(false, test1.dayOfMonth().equals(null));
    assertEquals(false, test1.dayOfMonth().equals("any"));

    // chrono
    assertEquals(false, test1.dayOfMonth().equals(test3.dayOfMonth()));
}
项目:astor    文件:TestDateTimeFieldType.java   
public void test_other() throws Exception {
    assertEquals(1, DateTimeFieldType.class.getDeclaredClasses().length);
    Class cls = DateTimeFieldType.class.getDeclaredClasses()[0];
    assertEquals(1, cls.getDeclaredConstructors().length);
    Constructor con = cls.getDeclaredConstructors()[0];
    Object[] params = new Object[] {
        "other", new Byte((byte) 128), DurationFieldType.hours(), DurationFieldType.months()};
    con.setAccessible(true);  // for Apache Harmony JVM
    DateTimeFieldType type = (DateTimeFieldType) con.newInstance(params);

    assertEquals("other", type.getName());
    assertSame(DurationFieldType.hours(), type.getDurationType());
    assertSame(DurationFieldType.months(), type.getRangeDurationType());
    try {
        type.getField(CopticChronology.getInstanceUTC());
        fail();
    } catch (InternalError ex) {}
    DateTimeFieldType result = doSerialization(type);
    assertEquals(type.getName(), result.getName());
    assertNotSame(type, result);
}
项目:astor    文件:TestMonthDay_Properties.java   
public void testPropertyEquals() {
    MonthDay test1 = new MonthDay(11, 11);
    MonthDay test2 = new MonthDay(11, 12);
    MonthDay test3 = new MonthDay(11, 11, CopticChronology.getInstanceUTC());
    assertEquals(true, test1.dayOfMonth().equals(test1.dayOfMonth()));
    assertEquals(false, test1.dayOfMonth().equals(test1.monthOfYear()));
    assertEquals(false, test1.dayOfMonth().equals(test2.dayOfMonth()));
    assertEquals(false, test1.dayOfMonth().equals(test2.monthOfYear()));

    assertEquals(false, test1.monthOfYear().equals(test1.dayOfMonth()));
    assertEquals(true, test1.monthOfYear().equals(test1.monthOfYear()));
    assertEquals(false, test1.monthOfYear().equals(test2.dayOfMonth()));
    assertEquals(true, test1.monthOfYear().equals(test2.monthOfYear()));

    assertEquals(false, test1.dayOfMonth().equals(null));
    assertEquals(false, test1.dayOfMonth().equals("any"));

    // chrono
    assertEquals(false, test1.dayOfMonth().equals(test3.dayOfMonth()));
}
项目:astor    文件:TestChronology.java   
public void testToString() {
    DateTimeZone paris = DateTimeZone.forID("Europe/Paris");
    ISOChronology isoParis = ISOChronology.getInstance(paris);

    assertEquals("ISOChronology[Europe/Paris]", isoParis.toString());
    assertEquals("GJChronology[Europe/Paris]", GJChronology.getInstance(paris).toString());
    assertEquals("GregorianChronology[Europe/Paris]", GregorianChronology.getInstance(paris).toString());
    assertEquals("JulianChronology[Europe/Paris]", JulianChronology.getInstance(paris).toString());
    assertEquals("BuddhistChronology[Europe/Paris]", BuddhistChronology.getInstance(paris).toString());
    assertEquals("CopticChronology[Europe/Paris]", CopticChronology.getInstance(paris).toString());
    assertEquals("EthiopicChronology[Europe/Paris]", EthiopicChronology.getInstance(paris).toString());
    assertEquals("IslamicChronology[Europe/Paris]", IslamicChronology.getInstance(paris).toString());

    assertEquals("LenientChronology[ISOChronology[Europe/Paris]]", LenientChronology.getInstance(isoParis).toString());
    assertEquals("StrictChronology[ISOChronology[Europe/Paris]]", StrictChronology.getInstance(isoParis).toString());
    assertEquals("LimitChronology[ISOChronology[Europe/Paris], NoLimit, NoLimit]", LimitChronology.getInstance(isoParis, null, null).toString());
    assertEquals("ZonedChronology[ISOChronology[UTC], Europe/Paris]", ZonedChronology.getInstance(isoParis, paris).toString());
}
项目:astor    文件:TestYearMonth_Properties.java   
public void testPropertyEquals() {
    YearMonth test1 = new YearMonth(11, 11);
    YearMonth test2 = new YearMonth(11, 12);
    YearMonth test3 = new YearMonth(11, 11, CopticChronology.getInstanceUTC());
    assertEquals(true, test1.monthOfYear().equals(test1.monthOfYear()));
    assertEquals(false, test1.monthOfYear().equals(test1.year()));
    assertEquals(false, test1.monthOfYear().equals(test2.monthOfYear()));
    assertEquals(false, test1.monthOfYear().equals(test2.year()));

    assertEquals(false, test1.year().equals(test1.monthOfYear()));
    assertEquals(true, test1.year().equals(test1.year()));
    assertEquals(false, test1.year().equals(test2.monthOfYear()));
    assertEquals(true, test1.year().equals(test2.year()));

    assertEquals(false, test1.monthOfYear().equals(null));
    assertEquals(false, test1.monthOfYear().equals("any"));

    // chrono
    assertEquals(false, test1.monthOfYear().equals(test3.monthOfYear()));
}
项目:astor    文件:TestDateTimeFieldType.java   
public void test_era() throws Exception {
    assertEquals(DateTimeFieldType.era(), DateTimeFieldType.era());
    assertEquals("era", DateTimeFieldType.era().getName());
    assertEquals(DurationFieldType.eras(), DateTimeFieldType.era().getDurationType());
    assertEquals(null, DateTimeFieldType.era().getRangeDurationType());
    assertEquals(CopticChronology.getInstanceUTC().era(), DateTimeFieldType.era().getField(CopticChronology.getInstanceUTC()));
    assertEquals(CopticChronology.getInstanceUTC().era().isSupported(), DateTimeFieldType.era().isSupported(CopticChronology.getInstanceUTC()));
    assertSerialization(DateTimeFieldType.era());
}
项目:astor    文件:TestDateTimeFieldType.java   
public void test_centuryOfEra() throws Exception {
    assertEquals(DateTimeFieldType.centuryOfEra(), DateTimeFieldType.centuryOfEra());
    assertEquals("centuryOfEra", DateTimeFieldType.centuryOfEra().getName());
    assertEquals(DurationFieldType.centuries(), DateTimeFieldType.centuryOfEra().getDurationType());
    assertEquals(DurationFieldType.eras(), DateTimeFieldType.centuryOfEra().getRangeDurationType());
    assertEquals(CopticChronology.getInstanceUTC().centuryOfEra(), DateTimeFieldType.centuryOfEra().getField(CopticChronology.getInstanceUTC()));
    assertEquals(CopticChronology.getInstanceUTC().centuryOfEra().isSupported(), DateTimeFieldType.centuryOfEra().isSupported(CopticChronology.getInstanceUTC()));
    assertSerialization(DateTimeFieldType.centuryOfEra());
}
项目:astor    文件:TestDateTimeFieldType.java   
public void test_yearOfCentury() throws Exception {
    assertEquals(DateTimeFieldType.yearOfCentury(), DateTimeFieldType.yearOfCentury());
    assertEquals("yearOfCentury", DateTimeFieldType.yearOfCentury().getName());
    assertEquals(DurationFieldType.years(), DateTimeFieldType.yearOfCentury().getDurationType());
    assertEquals(DurationFieldType.centuries(), DateTimeFieldType.yearOfCentury().getRangeDurationType());
    assertEquals(CopticChronology.getInstanceUTC().yearOfCentury(), DateTimeFieldType.yearOfCentury().getField(CopticChronology.getInstanceUTC()));
    assertEquals(CopticChronology.getInstanceUTC().yearOfCentury().isSupported(), DateTimeFieldType.yearOfCentury().isSupported(CopticChronology.getInstanceUTC()));
    assertSerialization(DateTimeFieldType.yearOfCentury());
}
项目:astor    文件:TestDurationFieldType.java   
public void test_minutes() throws Exception {
    assertEquals(DurationFieldType.minutes(), DurationFieldType.minutes());
    assertEquals("minutes", DurationFieldType.minutes().getName());
    assertEquals(CopticChronology.getInstanceUTC().minutes(), DurationFieldType.minutes().getField(CopticChronology.getInstanceUTC()));
    assertEquals(CopticChronology.getInstanceUTC().minutes().isSupported(), DurationFieldType.minutes().isSupported(CopticChronology.getInstanceUTC()));
    assertSerialization(DurationFieldType.minutes());
}
项目:astor    文件:TestDateTimeFieldType.java   
public void test_year() throws Exception {
    assertEquals(DateTimeFieldType.year(), DateTimeFieldType.year());
    assertEquals("year", DateTimeFieldType.year().getName());
    assertEquals(DurationFieldType.years(), DateTimeFieldType.year().getDurationType());
    assertEquals(null, DateTimeFieldType.year().getRangeDurationType());
    assertEquals(CopticChronology.getInstanceUTC().year(), DateTimeFieldType.year().getField(CopticChronology.getInstanceUTC()));
    assertEquals(CopticChronology.getInstanceUTC().year().isSupported(), DateTimeFieldType.year().isSupported(CopticChronology.getInstanceUTC()));
    assertSerialization(DateTimeFieldType.year());
}
项目:astor    文件:TestDateTimeFieldType.java   
public void test_weekyearOfCentury() throws Exception {
    assertEquals(DateTimeFieldType.weekyearOfCentury(), DateTimeFieldType.weekyearOfCentury());
    assertEquals("weekyearOfCentury", DateTimeFieldType.weekyearOfCentury().getName());
    assertEquals(DurationFieldType.weekyears(), DateTimeFieldType.weekyearOfCentury().getDurationType());
    assertEquals(DurationFieldType.centuries(), DateTimeFieldType.weekyearOfCentury().getRangeDurationType());
    assertEquals(CopticChronology.getInstanceUTC().weekyearOfCentury(), DateTimeFieldType.weekyearOfCentury().getField(CopticChronology.getInstanceUTC()));
    assertEquals(CopticChronology.getInstanceUTC().weekyearOfCentury().isSupported(), DateTimeFieldType.weekyearOfCentury().isSupported(CopticChronology.getInstanceUTC()));
    assertSerialization(DateTimeFieldType.weekyearOfCentury());
}
项目:astor    文件:TestDateTimeFieldType.java   
public void test_weekyear() throws Exception {
    assertEquals(DateTimeFieldType.weekyear(), DateTimeFieldType.weekyear());
    assertEquals("weekyear", DateTimeFieldType.weekyear().getName());
    assertEquals(DurationFieldType.weekyears(), DateTimeFieldType.weekyear().getDurationType());
    assertEquals(null, DateTimeFieldType.weekyear().getRangeDurationType());
    assertEquals(CopticChronology.getInstanceUTC().weekyear(), DateTimeFieldType.weekyear().getField(CopticChronology.getInstanceUTC()));
    assertEquals(CopticChronology.getInstanceUTC().weekyear().isSupported(), DateTimeFieldType.weekyear().isSupported(CopticChronology.getInstanceUTC()));
    assertSerialization(DateTimeFieldType.weekyear());
}
项目:astor    文件:TestDurationFieldType.java   
public void test_seconds() throws Exception {
    assertEquals(DurationFieldType.seconds(), DurationFieldType.seconds());
    assertEquals("seconds", DurationFieldType.seconds().getName());
    assertEquals(CopticChronology.getInstanceUTC().seconds(), DurationFieldType.seconds().getField(CopticChronology.getInstanceUTC()));
    assertEquals(CopticChronology.getInstanceUTC().seconds().isSupported(), DurationFieldType.seconds().isSupported(CopticChronology.getInstanceUTC()));
    assertSerialization(DurationFieldType.seconds());
}
项目:astor    文件:TestDateTimeFieldType.java   
public void test_dayOfYear() throws Exception {
    assertEquals(DateTimeFieldType.dayOfYear(), DateTimeFieldType.dayOfYear());
    assertEquals("dayOfYear", DateTimeFieldType.dayOfYear().getName());
    assertEquals(DurationFieldType.days(), DateTimeFieldType.dayOfYear().getDurationType());
    assertEquals(DurationFieldType.years(), DateTimeFieldType.dayOfYear().getRangeDurationType());
    assertEquals(CopticChronology.getInstanceUTC().dayOfYear(), DateTimeFieldType.dayOfYear().getField(CopticChronology.getInstanceUTC()));
    assertEquals(CopticChronology.getInstanceUTC().dayOfYear().isSupported(), DateTimeFieldType.dayOfYear().isSupported(CopticChronology.getInstanceUTC()));
    assertSerialization(DateTimeFieldType.dayOfYear());
}
项目:astor    文件:TestDateTimeFieldType.java   
public void test_dayOfMonth() throws Exception {
    assertEquals(DateTimeFieldType.dayOfMonth(), DateTimeFieldType.dayOfMonth());
    assertEquals("dayOfMonth", DateTimeFieldType.dayOfMonth().getName());
    assertEquals(DurationFieldType.days(), DateTimeFieldType.dayOfMonth().getDurationType());
    assertEquals(DurationFieldType.months(), DateTimeFieldType.dayOfMonth().getRangeDurationType());
    assertEquals(CopticChronology.getInstanceUTC().dayOfMonth(), DateTimeFieldType.dayOfMonth().getField(CopticChronology.getInstanceUTC()));
    assertEquals(CopticChronology.getInstanceUTC().dayOfMonth().isSupported(), DateTimeFieldType.dayOfMonth().isSupported(CopticChronology.getInstanceUTC()));
    assertSerialization(DateTimeFieldType.dayOfMonth());
}
项目:astor    文件:TestDateTimeFieldType.java   
public void test_dayOfWeek() throws Exception {
    assertEquals(DateTimeFieldType.dayOfWeek(), DateTimeFieldType.dayOfWeek());
    assertEquals("dayOfWeek", DateTimeFieldType.dayOfWeek().getName());
    assertEquals(DurationFieldType.days(), DateTimeFieldType.dayOfWeek().getDurationType());
    assertEquals(DurationFieldType.weeks(), DateTimeFieldType.dayOfWeek().getRangeDurationType());
    assertEquals(CopticChronology.getInstanceUTC().dayOfWeek(), DateTimeFieldType.dayOfWeek().getField(CopticChronology.getInstanceUTC()));
    assertEquals(CopticChronology.getInstanceUTC().dayOfWeek().isSupported(), DateTimeFieldType.dayOfWeek().isSupported(CopticChronology.getInstanceUTC()));
    assertSerialization(DateTimeFieldType.dayOfWeek());
}
项目:astor    文件:TestDateTimeFieldType.java   
public void test_halfdayOfDay() throws Exception {
    assertEquals(DateTimeFieldType.halfdayOfDay(), DateTimeFieldType.halfdayOfDay());
    assertEquals("halfdayOfDay", DateTimeFieldType.halfdayOfDay().getName());
    assertEquals(DurationFieldType.halfdays(), DateTimeFieldType.halfdayOfDay().getDurationType());
    assertEquals(DurationFieldType.days(), DateTimeFieldType.halfdayOfDay().getRangeDurationType());
    assertEquals(CopticChronology.getInstanceUTC().halfdayOfDay(), DateTimeFieldType.halfdayOfDay().getField(CopticChronology.getInstanceUTC()));
    assertEquals(CopticChronology.getInstanceUTC().halfdayOfDay().isSupported(), DateTimeFieldType.halfdayOfDay().isSupported(CopticChronology.getInstanceUTC()));
    assertSerialization(DateTimeFieldType.halfdayOfDay());
}
项目:astor    文件:TestDateTimeFieldType.java   
public void test_clockhourOfDay() throws Exception {
    assertEquals(DateTimeFieldType.clockhourOfDay(), DateTimeFieldType.clockhourOfDay());
    assertEquals("clockhourOfDay", DateTimeFieldType.clockhourOfDay().getName());
    assertEquals(DurationFieldType.hours(), DateTimeFieldType.clockhourOfDay().getDurationType());
    assertEquals(DurationFieldType.days(), DateTimeFieldType.clockhourOfDay().getRangeDurationType());
    assertEquals(CopticChronology.getInstanceUTC().clockhourOfDay(), DateTimeFieldType.clockhourOfDay().getField(CopticChronology.getInstanceUTC()));
    assertEquals(CopticChronology.getInstanceUTC().clockhourOfDay().isSupported(), DateTimeFieldType.clockhourOfDay().isSupported(CopticChronology.getInstanceUTC()));
    assertSerialization(DateTimeFieldType.clockhourOfDay());
}
项目:astor    文件:TestDurationFieldType.java   
public void test_hours() throws Exception {
    assertEquals(DurationFieldType.hours(), DurationFieldType.hours());
    assertEquals("hours", DurationFieldType.hours().getName());
    assertEquals(CopticChronology.getInstanceUTC().hours(), DurationFieldType.hours().getField(CopticChronology.getInstanceUTC()));
    assertEquals(CopticChronology.getInstanceUTC().hours().isSupported(), DurationFieldType.hours().isSupported(CopticChronology.getInstanceUTC()));
    assertSerialization(DurationFieldType.hours());
}
项目:astor    文件:TestDateTimeFieldType.java   
public void test_hourOfHalfday() throws Exception {
    assertEquals(DateTimeFieldType.hourOfHalfday(), DateTimeFieldType.hourOfHalfday());
    assertEquals("hourOfHalfday", DateTimeFieldType.hourOfHalfday().getName());
    assertEquals(DurationFieldType.hours(), DateTimeFieldType.hourOfHalfday().getDurationType());
    assertEquals(DurationFieldType.halfdays(), DateTimeFieldType.hourOfHalfday().getRangeDurationType());
    assertEquals(CopticChronology.getInstanceUTC().hourOfHalfday(), DateTimeFieldType.hourOfHalfday().getField(CopticChronology.getInstanceUTC()));
    assertEquals(CopticChronology.getInstanceUTC().hourOfHalfday().isSupported(), DateTimeFieldType.hourOfHalfday().isSupported(CopticChronology.getInstanceUTC()));
    assertSerialization(DateTimeFieldType.hourOfHalfday());
}
项目:astor    文件:TestDateTimeFieldType.java   
public void test_hourOfDay() throws Exception {
    assertEquals(DateTimeFieldType.hourOfDay(), DateTimeFieldType.hourOfDay());
    assertEquals("hourOfDay", DateTimeFieldType.hourOfDay().getName());
    assertEquals(DurationFieldType.hours(), DateTimeFieldType.hourOfDay().getDurationType());
    assertEquals(DurationFieldType.days(), DateTimeFieldType.hourOfDay().getRangeDurationType());
    assertEquals(CopticChronology.getInstanceUTC().hourOfDay(), DateTimeFieldType.hourOfDay().getField(CopticChronology.getInstanceUTC()));
    assertEquals(CopticChronology.getInstanceUTC().hourOfDay().isSupported(), DateTimeFieldType.hourOfDay().isSupported(CopticChronology.getInstanceUTC()));
    assertSerialization(DateTimeFieldType.hourOfDay());
}
项目:astor    文件:TestDateTimeFieldType.java   
public void test_minuteOfDay() throws Exception {
    assertEquals(DateTimeFieldType.minuteOfDay(), DateTimeFieldType.minuteOfDay());
    assertEquals("minuteOfDay", DateTimeFieldType.minuteOfDay().getName());
    assertEquals(DurationFieldType.minutes(), DateTimeFieldType.minuteOfDay().getDurationType());
    assertEquals(DurationFieldType.days(), DateTimeFieldType.minuteOfDay().getRangeDurationType());
    assertEquals(CopticChronology.getInstanceUTC().minuteOfDay(), DateTimeFieldType.minuteOfDay().getField(CopticChronology.getInstanceUTC()));
    assertEquals(CopticChronology.getInstanceUTC().minuteOfDay().isSupported(), DateTimeFieldType.minuteOfDay().isSupported(CopticChronology.getInstanceUTC()));
    assertSerialization(DateTimeFieldType.minuteOfDay());
}
项目:astor    文件:TestDateTimeFieldType.java   
public void test_secondOfDay() throws Exception {
    assertEquals(DateTimeFieldType.secondOfDay(), DateTimeFieldType.secondOfDay());
    assertEquals("secondOfDay", DateTimeFieldType.secondOfDay().getName());
    assertEquals(DurationFieldType.seconds(), DateTimeFieldType.secondOfDay().getDurationType());
    assertEquals(DurationFieldType.days(), DateTimeFieldType.secondOfDay().getRangeDurationType());
    assertEquals(CopticChronology.getInstanceUTC().secondOfDay(), DateTimeFieldType.secondOfDay().getField(CopticChronology.getInstanceUTC()));
    assertEquals(CopticChronology.getInstanceUTC().secondOfDay().isSupported(), DateTimeFieldType.secondOfDay().isSupported(CopticChronology.getInstanceUTC()));
    assertSerialization(DateTimeFieldType.secondOfDay());
}
项目:astor    文件:TestDateTimeFieldType.java   
public void test_secondOfMinute() throws Exception {
    assertEquals(DateTimeFieldType.secondOfMinute(), DateTimeFieldType.secondOfMinute());
    assertEquals("secondOfMinute", DateTimeFieldType.secondOfMinute().getName());
    assertEquals(DurationFieldType.seconds(), DateTimeFieldType.secondOfMinute().getDurationType());
    assertEquals(DurationFieldType.minutes(), DateTimeFieldType.secondOfMinute().getRangeDurationType());
    assertEquals(CopticChronology.getInstanceUTC().secondOfMinute(), DateTimeFieldType.secondOfMinute().getField(CopticChronology.getInstanceUTC()));
    assertEquals(CopticChronology.getInstanceUTC().secondOfMinute().isSupported(), DateTimeFieldType.secondOfMinute().isSupported(CopticChronology.getInstanceUTC()));
    assertSerialization(DateTimeFieldType.secondOfMinute());
}
项目:astor    文件:TestDateTimeFieldType.java   
public void test_millisOfDay() throws Exception {
    assertEquals(DateTimeFieldType.millisOfDay(), DateTimeFieldType.millisOfDay());
    assertEquals("millisOfDay", DateTimeFieldType.millisOfDay().getName());
    assertEquals(DurationFieldType.millis(), DateTimeFieldType.millisOfDay().getDurationType());
    assertEquals(DurationFieldType.days(), DateTimeFieldType.millisOfDay().getRangeDurationType());
    assertEquals(CopticChronology.getInstanceUTC().millisOfDay(), DateTimeFieldType.millisOfDay().getField(CopticChronology.getInstanceUTC()));
    assertEquals(CopticChronology.getInstanceUTC().millisOfDay().isSupported(), DateTimeFieldType.millisOfDay().isSupported(CopticChronology.getInstanceUTC()));
    assertSerialization(DateTimeFieldType.millisOfDay());
}
项目:astor    文件:TestDateTimeFieldType.java   
public void test_millisOfSecond() throws Exception {
    assertEquals(DateTimeFieldType.millisOfSecond(), DateTimeFieldType.millisOfSecond());
    assertEquals("millisOfSecond", DateTimeFieldType.millisOfSecond().getName());
    assertEquals(DurationFieldType.millis(), DateTimeFieldType.millisOfSecond().getDurationType());
    assertEquals(DurationFieldType.seconds(), DateTimeFieldType.millisOfSecond().getRangeDurationType());
    assertEquals(CopticChronology.getInstanceUTC().millisOfSecond(), DateTimeFieldType.millisOfSecond().getField(CopticChronology.getInstanceUTC()));
    assertEquals(CopticChronology.getInstanceUTC().millisOfSecond().isSupported(), DateTimeFieldType.millisOfSecond().isSupported(CopticChronology.getInstanceUTC()));
    assertSerialization(DateTimeFieldType.millisOfSecond());
}
项目:astor    文件:TestInterval_Constructors.java   
public void testConstructor_RI_RP3() throws Throwable {
    DateTime dt = new DateTime(TEST_TIME_NOW, CopticChronology.getInstanceUTC());
    Period dur = new Period(0, 6, 0, 3, 1, 0, 0, 0, PeriodType.standard());
    long result = TEST_TIME_NOW;
    result = CopticChronology.getInstanceUTC().months().add(result, 6);
    result = CopticChronology.getInstanceUTC().days().add(result, 3);
    result = CopticChronology.getInstanceUTC().hours().add(result, 1);

    Interval test = new Interval(dt, dur);
    assertEquals(dt.getMillis(), test.getStartMillis());
    assertEquals(result, test.getEndMillis());
}
项目:astor    文件:TestPeriod_Constructors.java   
public void testConstructor_long_long_PeriodType_Chronology1() throws Throwable {
    DateTime dt1 = new DateTime(2004, 6, 9, 0, 0, 0, 0, CopticChronology.getInstance());
    DateTime dt2 = new DateTime(2005, 7, 10, 1, 1, 1, 1, CopticChronology.getInstance());
    Period test = new Period(dt1.getMillis(), dt2.getMillis(), (PeriodType) null, CopticChronology.getInstance());
    assertEquals(PeriodType.standard(), test.getPeriodType());
    assertEquals(1, test.getYears());
    assertEquals(1, test.getMonths());
    assertEquals(0, test.getWeeks());
    assertEquals(1, test.getDays());
    assertEquals(1, test.getHours());
    assertEquals(1, test.getMinutes());
    assertEquals(1, test.getSeconds());
    assertEquals(1, test.getMillis());
}
项目:astor    文件:TestPartial_Basics.java   
public void testGetFields() {
    Partial test = createHourMinPartial(COPTIC_PARIS);
    DateTimeField[] fields = test.getFields();
    assertEquals(2, fields.length);
    assertSame(CopticChronology.getInstanceUTC().hourOfDay(), fields[0]);
    assertSame(CopticChronology.getInstanceUTC().minuteOfHour(), fields[1]);
    assertNotSame(test.getFields(), test.getFields());
}
项目:astor    文件:TestDurationFieldType.java   
public void test_days() throws Exception {
    assertEquals(DurationFieldType.days(), DurationFieldType.days());
    assertEquals("days", DurationFieldType.days().getName());
    assertEquals(CopticChronology.getInstanceUTC().days(), DurationFieldType.days().getField(CopticChronology.getInstanceUTC()));
    assertEquals(CopticChronology.getInstanceUTC().days().isSupported(), DurationFieldType.days().isSupported(CopticChronology.getInstanceUTC()));
    assertSerialization(DurationFieldType.days());
}
项目:astor    文件:TestNullConverter.java   
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());
}
项目:astor    文件:TestTimeOfDay_Basics.java   
public void testGetFields() {
    TimeOfDay test = new TimeOfDay(COPTIC_PARIS);
    DateTimeField[] fields = test.getFields();
    assertSame(CopticChronology.getInstanceUTC().hourOfDay(), fields[0]);
    assertSame(CopticChronology.getInstanceUTC().minuteOfHour(), fields[1]);
    assertSame(CopticChronology.getInstanceUTC().secondOfMinute(), fields[2]);
    assertSame(CopticChronology.getInstanceUTC().millisOfSecond(), fields[3]);
    assertNotSame(test.getFields(), test.getFields());
}
项目:astor    文件:TestReadableIntervalConverter.java   
public void testSetIntoInterval_Object1() throws Exception {
    Interval i = new Interval(0L, 123L, CopticChronology.getInstance());
    MutableInterval m = new MutableInterval(-1000L, 1000L, BuddhistChronology.getInstance());
    ReadableIntervalConverter.INSTANCE.setInto(m, i, null);
    assertEquals(0L, m.getStartMillis());
    assertEquals(123L, m.getEndMillis());
    assertEquals(CopticChronology.getInstance(), m.getChronology());
}