use of org.neo4j.internal.kernel.api.procs.Neo4jTypes.NTString in project neo4j by neo4j.
the class ListConverterTest method shouldHandleSingleQuotedValue.
@Test
void shouldHandleSingleQuotedValue() {
// Given
ListConverter converter = new ListConverter(String.class, NTString, expressionEvaluator());
String listString = "['foo', 'bar']";
// When
DefaultParameterValue converted = converter.apply(listString);
// Then
assertThat(converted).isEqualTo(ntList(asList("foo", "bar"), NTString));
}
use of org.neo4j.internal.kernel.api.procs.Neo4jTypes.NTString in project neo4j by neo4j.
the class ListConverterTest method shouldHandleDoubleQuotedValue.
@Test
void shouldHandleDoubleQuotedValue() {
// Given
ListConverter converter = new ListConverter(String.class, NTString, expressionEvaluator());
String listString = "[\"foo\", \"bar\"]";
// When
DefaultParameterValue converted = converter.apply(listString);
// Then
assertThat(converted).isEqualTo(ntList(asList("foo", "bar"), NTString));
}
use of org.neo4j.internal.kernel.api.procs.Neo4jTypes.NTString 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));
}
Aggregations