예제 #1
0
 @Test
 public void testXLSWithHeader() throws Exception {
   ExcelImport import1 = createExcelImport();
   import1.setHeader(true);
   testExcelImporter("ms.xls", import1);
   Space space1 = metaspace.getSpace("space1");
   Tuple tuple1 = Tuple.create();
   tuple1.putLong("Field1", 1);
   tuple1 = space1.get(tuple1);
   Assert.assertEquals("2", tuple1.getString("Field5"));
 }
예제 #2
0
 private void assertSpace1(String spaceName) throws ASException, ParseException {
   Space space1 = metaspace.getSpace(spaceName);
   Assert.assertEquals(17, space1.size());
   Tuple tuple18 = Tuple.create();
   tuple18.putLong("Field1", 18);
   tuple18 = space1.get(tuple18);
   SimpleDateFormat dateFormat = new SimpleDateFormat("MM/dd/yy");
   Date date18 = dateFormat.parse("1/18/14");
   Assert.assertEquals(DateTime.create(date18.getTime()), tuple18.getDateTime("Field2"));
   Assert.assertEquals(null, tuple18.getBoolean("Field4"));
   Assert.assertEquals('q', tuple18.getChar("Field3").charValue());
 }