* 時刻の値を出力するテスト。
* @throws Exception 例外が発生した場合
*/
@Test
public void emitDateTime() throws Exception {
DateTimeOption value = new DateTimeOption();
value.modify(time(2000, 2, 9, 1, 2, 3));
emitter.emit(value);
value.modify(time(2000, 3, 1, 8, 9, 10));
emitter.emit(value);
value.modify(time(100, 3, 30, 11, 12, 0));
emitter.emit(value);
emitter.endRecord();
value.setNull();
emitter.emit(value);
value.modify(time(1, 1, 1, 0, 0, 0));
emitter.emit(value);
value.modify(time(9999, 12, 31, 23, 59, 59));
emitter.emit(value);
emitter.endRecord();
emitter.close();
RecordParser parser = parser();
assertThat(parser.next(), is(true));
parser.fill(value);
assertThat(value.get(), is(time(2000, 2, 9, 1, 2, 3)));
parser.fill(value);
assertThat(value.get(), is(time(2000, 3, 1, 8, 9, 10)));
parser.fill(value);
assertThat(value.get(), is(time(100, 3, 30, 11, 12, 0)));
assertThat(parser.next(), is(true));
parser.fill(value);
assertThat(value.isNull(), is(true));
parser.fill(value);
assertThat(value.get(), is(time(1, 1, 1, 0, 0, 0)));
parser.fill(value);
assertThat(value.get(), is(time(9999, 12, 31, 23, 59, 59)));
assertThat(parser.next(), is(false));
}