use of org.neo4j.internal.kernel.api.procs.DefaultParameterValue in project neo4j by neo4j.
the class ListConverterTest method shouldHandleNullString.
@Test
void shouldHandleNullString() {
// Given
ListConverter converter = new ListConverter(String.class, NTString, expressionEvaluator());
String listString = "null";
// When
DefaultParameterValue converted = converter.apply(listString);
// Then
assertThat(converted).isEqualTo(ntList(null, NTString));
}
use of org.neo4j.internal.kernel.api.procs.DefaultParameterValue in project neo4j by neo4j.
the class MapConverterTest method shouldHandleIntegerValue.
@Test
void shouldHandleIntegerValue() {
// Given
String mapString = "{key: 1337}";
// When
DefaultParameterValue converted = converter.apply(mapString);
// Then
assertThat(converted).isEqualTo(ntMap(map("key", 1337L)));
}
use of org.neo4j.internal.kernel.api.procs.DefaultParameterValue in project neo4j by neo4j.
the class MapConverterTest method shouldHandleEscapedSingleQuotedInValue2.
@Test
void shouldHandleEscapedSingleQuotedInValue2() {
// Given
String mapString = "{key: \"va\'lue\"}";
// When
DefaultParameterValue converted = converter.apply(mapString);
// Then
assertThat(converted).isEqualTo(ntMap(map("key", "va\'lue")));
}
use of org.neo4j.internal.kernel.api.procs.DefaultParameterValue in project neo4j by neo4j.
the class MapConverterTest method shouldHandleFalseValue.
@Test
void shouldHandleFalseValue() {
// Given
String mapString = "{key: false}";
// When
DefaultParameterValue converted = converter.apply(mapString);
// Then
assertThat(converted).isEqualTo(ntMap(map("key", false)));
}
use of org.neo4j.internal.kernel.api.procs.DefaultParameterValue in project neo4j by neo4j.
the class MapConverterTest method shouldHandleEscapedDoubleQuotedInValue2.
@Test
void shouldHandleEscapedDoubleQuotedInValue2() {
// Given
String mapString = "{key: 'va\"lue'}";
// When
DefaultParameterValue converted = converter.apply(mapString);
// Then
assertThat(converted).isEqualTo(ntMap(map("key", "va\"lue")));
}
Aggregations