Code example for GregorianCalendar

Methods: get, getTimeZone

0
	 * @tests java.util.GregorianCalendar#GregorianCalendar(int, int, int, int, 
	 *        int) 
	 */ 
	public void test_ConstructorIIIII() { 
		// Test for method java.util.GregorianCalendar(int, int, int, int, int) 
		GregorianCalendar gc = new GregorianCalendar(1972, Calendar.OCTOBER,
				13, 19, 9); 
		assertEquals("Incorrect calendar constructed",
				1972, gc.get(Calendar.YEAR));
		assertTrue("Incorrect calendar constructed",
				gc.get(Calendar.MONTH) == Calendar.OCTOBER);
		assertEquals("Incorrect calendar constructed", 13, gc
				.get(Calendar.DAY_OF_MONTH));
		assertEquals("Incorrect calendar constructed", 7, gc.get(Calendar.HOUR));
		assertEquals("Incorrect calendar constructed",
				1, gc.get(Calendar.AM_PM));
		assertEquals("Incorrect calendar constructed",
				9, gc.get(Calendar.MINUTE));
		assertTrue("Incorrect calendar constructed", gc.getTimeZone().equals(
				TimeZone.getDefault()));
 
        //Regression for HARMONY-998 
        gc = new GregorianCalendar(1900, 0, 0, 0, Integer.MAX_VALUE);
		assertEquals("Incorrect calendar constructed",