use of org.apache.poi.hsmf.datatypes.PropertyValue in project poi by apache.
the class TestFixedSizedProperties method testClientSubmitTime.
/**
* Will be based on the ClientSubmit time
*/
@Test
public void testClientSubmitTime() throws Exception {
// Check via the message date
Calendar clientSubmitTime = mapiMessageSucceeds.getMessageDate();
assertEquals("Fri, 22 Jun 2012 18:32:54", messageDateFormat.format(clientSubmitTime.getTime()));
// Fetch the property value directly
Map<MAPIProperty, List<PropertyValue>> props = mapiMessageSucceeds.getMainChunks().getProperties();
List<PropertyValue> pv = props.get(MAPIProperty.CLIENT_SUBMIT_TIME);
assertNotNull(pv);
assertEquals(1, pv.size());
clientSubmitTime = (Calendar) pv.get(0).getValue();
assertEquals("Fri, 22 Jun 2012 18:32:54", messageDateFormat.format(clientSubmitTime.getTime()));
}
Aggregations