use of org.neo4j.driver.internal.value.FloatValue in project neo4j by neo4j.
the class TablePlanFormatterTest method withEmptyDetails.
@Test
public void withEmptyDetails() {
Plan plan = mock(Plan.class);
Map<String, Value> args = new HashMap<String, Value>(2) {
{
put("EstimatedRows", new FloatValue(55));
put("Details", new StringValue(""));
}
};
when(plan.arguments()).thenReturn(args);
when(plan.operatorType()).thenReturn("Projection");
assertThat(tablePlanFormatter.formatPlan(plan), is(String.join(NEWLINE, "+-------------+---------+----------------+", "| Operator | Details | Estimated Rows |", "+-------------+---------+----------------+", "| +Projection | | 55 |", "+-------------+---------+----------------+", "")));
}
use of org.neo4j.driver.internal.value.FloatValue in project neo4j by neo4j.
the class TablePlanFormatterTest method withNoDetails.
@Test
public void withNoDetails() {
Plan plan = mock(Plan.class);
Map<String, Value> args = Collections.singletonMap("EstimatedRows", new FloatValue(55));
when(plan.arguments()).thenReturn(args);
when(plan.operatorType()).thenReturn("Projection");
assertThat(tablePlanFormatter.formatPlan(plan), is(String.join(NEWLINE, "+-------------+----------------+", "| Operator | Estimated Rows |", "+-------------+----------------+", "| +Projection | 55 |", "+-------------+----------------+", "")));
}
Aggregations