use of org.neo4j.internal.kernel.api.procs.DefaultParameterValue in project neo4j by neo4j.
the class MapConverterTest method shouldHandleSingleQuotedValue.
@Test
void shouldHandleSingleQuotedValue() {
// Given
String mapString = "{key: 'value'}";
// When
DefaultParameterValue converted = converter.apply(mapString);
// Then
assertThat(converted).isEqualTo(ntMap(map("key", "value")));
}
use of org.neo4j.internal.kernel.api.procs.DefaultParameterValue in project neo4j by neo4j.
the class MapConverterTest method shouldHandleDoubleQuotedValue.
@Test
void shouldHandleDoubleQuotedValue() {
// Given
String mapString = "{key: \"value\"}";
// When
DefaultParameterValue converted = converter.apply(mapString);
// Then
assertThat(converted).isEqualTo(ntMap(map("key", "value")));
}
use of org.neo4j.internal.kernel.api.procs.DefaultParameterValue in project neo4j by neo4j.
the class MapConverterTest method shouldHandleNullString.
@Test
void shouldHandleNullString() {
// Given
String mapString = "null";
// When
DefaultParameterValue converted = converter.apply(mapString);
// Then
assertThat(converted).isEqualTo(ntMap(null));
}
use of org.neo4j.internal.kernel.api.procs.DefaultParameterValue in project neo4j by neo4j.
the class ListConverterTest method shouldHandleFloatValue.
@Test
void shouldHandleFloatValue() {
// Given
ListConverter converter = new ListConverter(Double.class, NTFloat, expressionEvaluator());
String listSting = "[2.718281828, 3.14]";
// When
DefaultParameterValue converted = converter.apply(listSting);
// Then
assertThat(converted).isEqualTo(ntList(asList(2.718281828, 3.14), NTFloat));
}
use of org.neo4j.internal.kernel.api.procs.DefaultParameterValue in project neo4j by neo4j.
the class ListConverterTest method shouldHandleEmptyListWithSpaces.
@Test
void shouldHandleEmptyListWithSpaces() {
// Given
ListConverter converter = new ListConverter(String.class, NTString, expressionEvaluator());
String listString = " [ ] ";
// When
DefaultParameterValue converted = converter.apply(listString);
// Then
assertThat(converted).isEqualTo(ntList(emptyList(), NTString));
}
Aggregations