assertEquals(22, f.getBirthday().get(Calendar.DAY_OF_MONTH));
}
//REV
{
RevType f = vcard.getRev();
Calendar c = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
c.clear();
c.set(Calendar.YEAR, 2012);
c.set(Calendar.MONTH, Calendar.MARCH);
c.set(Calendar.DAY_OF_MONTH, 5);
c.set(Calendar.HOUR_OF_DAY, 13);
c.set(Calendar.MINUTE, 32);
c.set(Calendar.SECOND, 54);
Calendar actual = f.getRevision();
assertEquals(c.getTime(), actual.getTime());
}
//custom types
{
List<ExtendedType> it = vcard.getExtendedTypes();
assertEquals(7, it.size());
ExtendedType f = it.get(0);
assertEquals("X-COUCHDB-APPLICATION-ANNOTATIONS", f.getExtendedName());
assertEquals("{\"Evolution\":{\"revision\":\"2012-03-05T13:32:54Z\"}}", f.getExtendedValue());
f = it.get(1);
assertEquals("X-AIM", f.getExtendedName());
assertEquals("johnny5@aol.com", f.getExtendedValue());
List<ExtendedParamType> xParamTypes = f.getExtendedParams();
assertEquals(2, xParamTypes.size());
ExtendedParamType xParamType = xParamTypes.get(0);
assertEquals("TYPE", xParamType.getTypeName());
assertEquals("HOME", xParamType.getTypeValue());
xParamType = xParamTypes.get(1);
assertEquals("X-COUCHDB-UUID",xParamType.getTypeName());
assertEquals("cb9e11fc-bb97-4222-9cd8-99820c1de454".toUpperCase(), xParamType.getTypeValue());
f = it.get(2);
assertEquals("X-EVOLUTION-FILE-AS", f.getExtendedName());
assertEquals("Doe, John", f.getExtendedValue());
f = it.get(3);
assertEquals("X-EVOLUTION-SPOUSE", f.getExtendedName());
assertEquals("Maria", f.getExtendedValue());
f = it.get(4);
assertEquals("X-EVOLUTION-MANAGER", f.getExtendedName());
assertEquals("Big Blue", f.getExtendedValue());
f = it.get(5);
assertEquals("X-EVOLUTION-ASSISTANT", f.getExtendedName());
assertEquals("Little Red", f.getExtendedValue());
f = it.get(6);
assertEquals("X-EVOLUTION-ANNIVERSARY", f.getExtendedName());
assertEquals("1980-03-22", f.getExtendedValue());
}
VCardImpl vcard2 = (VCardImpl)vcard;
if(vcard2.hasErrors()) {