Skip to content

Commit f9ac02d

Browse files
committed
fix unit tests for 3.x
1 parent c63985a commit f9ac02d

File tree

1 file changed

+12
-2
lines changed
  • tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-microsoft-module/src/test/java/org/apache/tika/parser/microsoft

1 file changed

+12
-2
lines changed

tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-microsoft-module/src/test/java/org/apache/tika/parser/microsoft/OutlookParserTest.java

+12-2
Original file line numberDiff line numberDiff line change
@@ -346,15 +346,25 @@ public void testTaskExtendedMetadata() throws Exception {
346346

347347
@Test
348348
public void testContactExtendedMetadata() throws Exception {
349-
List<Metadata> metadataList = getRecursiveMetadata("testMSG_Contact.msg");
349+
OfficeParserConfig officeParserConfig = new OfficeParserConfig();
350+
officeParserConfig.setExtractExtendedMsgProperties(true);
351+
ParseContext parseContext = new ParseContext();
352+
parseContext.set(OfficeParserConfig.class, officeParserConfig);
353+
354+
List<Metadata> metadataList = getRecursiveMetadata("testMSG_Contact.msg", parseContext);
350355
Metadata m = metadataList.get(0);
351356
assertEquals("2017-02-28T18:41:37Z", m.get("mapi:property:PidLidValidFlagStringProof"));
352357
}
353358

354359

355360
@Test
356361
public void testPostExtendedMetadata() throws Exception {
357-
List<Metadata> metadataList = getRecursiveMetadata("testMSG_Post.msg");
362+
OfficeParserConfig officeParserConfig = new OfficeParserConfig();
363+
officeParserConfig.setExtractExtendedMsgProperties(true);
364+
ParseContext parseContext = new ParseContext();
365+
parseContext.set(OfficeParserConfig.class, officeParserConfig);
366+
367+
List<Metadata> metadataList = getRecursiveMetadata("testMSG_Post.msg", parseContext);
358368
Metadata m = metadataList.get(0);
359369
assertEquals("2017-02-28T18:47:11Z", m.get("mapi:property:PidLidValidFlagStringProof"));
360370
}

0 commit comments

Comments
 (0)