use of org.neo4j.driver.internal.InternalIsoDuration in project neo4j by neo4j.
the class TableOutputFormatterTest method prettyPrintDurationWithNoTrailingZeroes.
@Test
public void prettyPrintDurationWithNoTrailingZeroes() {
// given
List<String> keys = asList("d");
Value duration = new DurationValue(new InternalIsoDuration(1, 2, 3, 0));
Record record = new InternalRecord(keys, new Value[] { duration });
// when
String actual = verbosePrinter.format(new ListBoltResult(asList(record), mock(ResultSummary.class)));
// then
assertThat(actual, containsString("| P1M2DT3S |"));
}
use of org.neo4j.driver.internal.InternalIsoDuration in project neo4j by neo4j.
the class TableOutputFormatterTest method prettyPrintDuration.
@Test
public void prettyPrintDuration() {
// given
List<String> keys = asList("d");
Value duration = new DurationValue(new InternalIsoDuration(1, 2, 3, 4));
Record record = new InternalRecord(keys, new Value[] { duration });
// when
String actual = verbosePrinter.format(new ListBoltResult(asList(record), mock(ResultSummary.class)));
// then
assertThat(actual, containsString("| P1M2DT3.000000004S |"));
}
Aggregations