use of org.neo4j.kernel.api.proc.Neo4jTypes.NTString in project neo4j by neo4j.
the class ListConverterTest method shouldHandleDoubleQuotedValue.
@Test
public void shouldHandleDoubleQuotedValue() {
// Given
ListConverter converter = new ListConverter(String.class, NTString);
String listString = "[\"foo\", \"bar\"]";
// When
Neo4jValue converted = converter.apply(listString);
// Then
assertThat(converted, equalTo(ntList(asList("foo", "bar"), NTString)));
}
use of org.neo4j.kernel.api.proc.Neo4jTypes.NTString in project neo4j by neo4j.
the class ListConverterTest method shouldHandleEmptyListWithSpaces.
@Test
public void shouldHandleEmptyListWithSpaces() {
// Given
ListConverter converter = new ListConverter(String.class, NTString);
String listString = " [ ] ";
// When
Neo4jValue converted = converter.apply(listString);
// Then
assertThat(converted, equalTo(ntList(emptyList(), NTString)));
}
use of org.neo4j.kernel.api.proc.Neo4jTypes.NTString in project neo4j by neo4j.
the class ListConverterTest method shouldHandleSingleQuotedValue.
@Test
public void shouldHandleSingleQuotedValue() {
// Given
ListConverter converter = new ListConverter(String.class, NTString);
String listString = "['foo', 'bar']";
// When
Neo4jValue converted = converter.apply(listString);
// Then
assertThat(converted, equalTo(ntList(asList("foo", "bar"), NTString)));
}
use of org.neo4j.kernel.api.proc.Neo4jTypes.NTString in project neo4j by neo4j.
the class ListConverterTest method shouldHandleNullString.
@Test
public void shouldHandleNullString() {
// Given
ListConverter converter = new ListConverter(String.class, NTString);
String listString = "null";
// When
Neo4jValue converted = converter.apply(listString);
// Then
assertThat(converted, equalTo(ntList(null, NTString)));
}
use of org.neo4j.kernel.api.proc.Neo4jTypes.NTString in project neo4j by neo4j.
the class ListConverterTest method shouldHandleEmptyList.
@Test
public void shouldHandleEmptyList() {
// Given
ListConverter converter = new ListConverter(String.class, NTString);
String listString = "[]";
// When
Neo4jValue converted = converter.apply(listString);
// Then
assertThat(converted, equalTo(ntList(emptyList(), NTString)));
}