Code example for GregorianCalendar

Methods: equals

0
	 * @tests java.util.GregorianCalendar#equals(java.lang.Object) 
	 */ 
	public void test_equalsLjava_lang_Object() { 
		// Test for method boolean 
		// java.util.GregorianCalendar.equals(java.lang.Object) 
		GregorianCalendar gc1 = new GregorianCalendar(1998, 11, 6);
		GregorianCalendar gc2 = new GregorianCalendar(2000, 11, 6);
		GregorianCalendar gc3 = new GregorianCalendar(1998, 11, 6);
		assertTrue("Equality check failed", gc1.equals(gc3));
		assertTrue("Equality check failed", !gc1.equals(gc2));
		gc3.setGregorianChange(new Date());
		assertTrue("Different gregorian change", !gc1.equals(gc3));
	} 
 
	/** 
	 * @tests java.util.GregorianCalendar#getActualMaximum(int) 
	 */ 
	public void test_getActualMaximumI() { 
		// Test for method int java.util.GregorianCalendar.getActualMaximum(int) 
		GregorianCalendar gc1 = new GregorianCalendar(1900, 1, 1);
		GregorianCalendar gc2 = new GregorianCalendar(1996, 1, 1);