https://bz.apache.org/bugzilla/show_bug.cgi?id=56154
Danil Lopatin <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #34026|0 |1 is patch| | --- Comment #4 from Danil Lopatin <[email protected]> --- Comment on attachment 34026 --> https://bz.apache.org/bugzilla/attachment.cgi?id=34026 moved tests to separate method >Index: src/ooxml/java/org/apache/poi/POIXMLProperties.java >=================================================================== >--- src/ooxml/java/org/apache/poi/POIXMLProperties.java (revision >1751911) >+++ src/ooxml/java/org/apache/poi/POIXMLProperties.java (working copy) >@@ -301,6 +301,12 @@ > public void setLastPrinted(String date) { > part.setLastPrintedProperty(date); > } >+ public String getLastModifiedBy() { >+ return part.getLastModifiedByProperty().getValue(); >+ } >+ public void setLastModifiedBy(String lastModifiedBy) { >+ part.setLastModifiedByProperty(lastModifiedBy); >+ } > public Date getModified() { > return part.getModifiedProperty().getValue(); > } >Index: src/ooxml/testcases/org/apache/poi/TestPOIXMLProperties.java >=================================================================== >--- src/ooxml/testcases/org/apache/poi/TestPOIXMLProperties.java >(revision 1751911) >+++ src/ooxml/testcases/org/apache/poi/TestPOIXMLProperties.java >(working copy) >@@ -192,7 +192,7 @@ > > XWPFDocument doc2 = XWPFTestDataSamples.writeOutAndReadBack(doc); > doc.close(); >- cp = doc.getProperties().getCoreProperties(); >+ cp = doc2.getProperties().getCoreProperties(); > Date dt3 = cp.getCreated(); > assertEquals(dateCreated, dt3); > doc2.close(); >@@ -208,6 +208,14 @@ > assertEquals("20", _coreProperties.getRevision()); > } > >+ @Test >+ public void testLastModifiedByProperty() { >+ String lastModifiedBy = _coreProperties.getLastModifiedBy(); >+ assertEquals("Paolo Mottadelli", lastModifiedBy); >+ _coreProperties.setLastModifiedBy("Test User"); >+ assertEquals("Test User", _coreProperties.getLastModifiedBy()); >+ } >+ > public static boolean dateTimeEqualToUTCString(Date dateTime, String > utcString) { > Calendar utcCalendar = > LocaleUtil.getLocaleCalendar(LocaleUtil.TIMEZONE_UTC); > utcCalendar.setTimeInMillis(dateTime.getTime()); -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
