public void testUnmarshall_Size_WaterfallFDO() throws Exception { String fdoFileName = WATERFALL_FILENAME; String fileDataObjectDoc = IOTools.readFileString(resourcePath + "/" + fdoFileName); FileDataObjectXMLParser parser = new FileDataObjectXMLParser(null); FileDataObject fileDataObject = parser.parse(fileDataObjectDoc); assertEquals(new Long(30124), fileDataObject.getSize()); }
public void testUnmarshall_Cttype_SimpleTextFDO() throws Exception { String fdoFileName = SIMPLETEXT_FILENAME; String fileDataObjectDoc = IOTools.readFileString(resourcePath + "/" + fdoFileName); FileDataObjectXMLParser parser = new FileDataObjectXMLParser(null); FileDataObject fileDataObject = parser.parse(fileDataObjectDoc); assertEquals("text/plain", fileDataObject.getContentType()); }
public void testUnmarshall_Modified_WaterfallFDO() throws Exception { String fdoFileName = WATERFALL_FILENAME; String fileDataObjectDoc = IOTools.readFileString(resourcePath + "/" + fdoFileName); FileDataObjectXMLParser parser = new FileDataObjectXMLParser(null); FileDataObject fileDataObject = parser.parse(fileDataObjectDoc); assertEquals("20030809T015500Z", fileDataObject.getModified()); }
public void testUnmarshall_Name_EmptyFDO() throws Exception { String fdoFileName = EMPTY_FILENAME; String fileDataObjectDoc = IOTools.readFileString(resourcePath + "/" + fdoFileName); FileDataObjectXMLParser parser = new FileDataObjectXMLParser(null); FileDataObject fileDataObject = parser.parse(fileDataObjectDoc); assertEquals("empty.jpg", fileDataObject.getName()); }
public void testUnmarshall_Accessed_WaterfallFDO() throws Exception { String fdoFileName = WATERFALL_FILENAME; String fileDataObjectDoc = IOTools.readFileString(resourcePath + "/" + fdoFileName); TimeZone berlinTZ = TimeZone.getTimeZone("Europe/Berlin"); FileDataObjectXMLParser parser = new FileDataObjectXMLParser(berlinTZ); FileDataObject fileDataObject = parser.parse(fileDataObjectDoc); assertEquals("20030808T235800Z", fileDataObject.getAccessed()); }