@Test public void testDocument2FlatValue() { Document doc = new DocumentImpl("id", "docName", 1024, new Date()); DocumentData documentData = processor.toFlatValue(field, doc, context); assertNotNull("DocumentData cannot be null!", documentData); assertEquals("Names are not equal", doc.getName(), documentData.getFileName()); assertEquals("Sizes are not equal", doc.getSize(), documentData.getSize()); assertEquals("Link must be empty", "", documentData.getLink()); }
@Test public void testNull2FlatValue() { DocumentData documentData = processor.toFlatValue(field, null, context); assertNull("DocumentData must be null!", documentData); }