use of org.neo4j.internal.kernel.api.procs.DefaultParameterValue in project neo4j by neo4j.
the class MapConverterTest method shouldHandleEmptyMap.
@Test
void shouldHandleEmptyMap() {
// Given
String mapString = "{}";
// When
DefaultParameterValue converted = converter.apply(mapString);
// Then
assertThat(converted).isEqualTo(ntMap(emptyMap()));
}
use of org.neo4j.internal.kernel.api.procs.DefaultParameterValue in project neo4j by neo4j.
the class MapConverterTest method shouldHandleKeyWithEscapedDoubleQuote.
@Test
void shouldHandleKeyWithEscapedDoubleQuote() {
// Given
String mapString = "{`k\"ey`: \"value\"}";
// When
DefaultParameterValue converted = converter.apply(mapString);
// Then
assertThat(converted).isEqualTo(ntMap(map("k\"ey", "value")));
}
use of org.neo4j.internal.kernel.api.procs.DefaultParameterValue in project neo4j by neo4j.
the class MapConverterTest method shouldHandleTrueValue.
@Test
void shouldHandleTrueValue() {
// Given
String mapString = "{key: true}";
// When
DefaultParameterValue converted = converter.apply(mapString);
// Then
assertThat(converted).isEqualTo(ntMap(map("key", true)));
}
use of org.neo4j.internal.kernel.api.procs.DefaultParameterValue in project neo4j by neo4j.
the class MapConverterTest method shouldHandleMultipleKeys.
@Test
void shouldHandleMultipleKeys() {
// Given
String mapString = "{k1: 2.718281828, k2: 'e'}";
// When
DefaultParameterValue converted = converter.apply(mapString);
// Then
assertThat(converted).isEqualTo(ntMap(map("k1", 2.718281828, "k2", "e")));
}
use of org.neo4j.internal.kernel.api.procs.DefaultParameterValue in project neo4j by neo4j.
the class MapConverterTest method shouldHandleFloatValue.
@Test
void shouldHandleFloatValue() {
// Given
String mapString = "{key: 2.718281828}";
// When
DefaultParameterValue converted = converter.apply(mapString);
// Then
assertThat(converted).isEqualTo(ntMap(map("key", 2.718281828)));
}
Aggregations