use of org.neo4j.bolt.packstream.Neo4jPackV2 in project neo4j by neo4j.
the class UnsupportedStructTypesV2IT method createRunWith.
private static byte[] createRunWith(ThrowingConsumer<Neo4jPack.Packer, IOException> valuePacker) throws IOException {
PackedOutputArray out = new PackedOutputArray();
Neo4jPack.Packer packer = new Neo4jPackV2().newPacker(out);
packer.packStructHeader(2, RunMessage.SIGNATURE);
packer.pack("RETURN $x");
packer.packMapHeader(1);
packer.pack("x");
valuePacker.accept(packer);
return out.bytes();
}
use of org.neo4j.bolt.packstream.Neo4jPackV2 in project neo4j by neo4j.
the class MessageDecoderTest method shouldCallExternalErrorOnTime.
@ParameterizedTest
@MethodSource("argumentsProvider")
public void shouldCallExternalErrorOnTime(Neo4jPack packerUnderTest) throws Exception {
this.packerUnderTest = packerUnderTest;
assumeThat(packerUnderTest.version()).isEqualTo(1);
testUnpackableStructParametersWithKnownType(new Neo4jPackV2(), ValueUtils.of(OffsetTime.now()), "OffsetTime values cannot be unpacked with this version of bolt.");
}
use of org.neo4j.bolt.packstream.Neo4jPackV2 in project neo4j by neo4j.
the class MessageDecoderTest method shouldCallExternalErrorOnDateTimeWithOffset.
@ParameterizedTest
@MethodSource("argumentsProvider")
public void shouldCallExternalErrorOnDateTimeWithOffset(Neo4jPack packerUnderTest) throws Exception {
this.packerUnderTest = packerUnderTest;
assumeThat(packerUnderTest.version()).isEqualTo(1);
testUnpackableStructParametersWithKnownType(new Neo4jPackV2(), ValueUtils.of(OffsetDateTime.now()), "OffsetDateTime values cannot be unpacked with this version of bolt.");
}
use of org.neo4j.bolt.packstream.Neo4jPackV2 in project neo4j by neo4j.
the class MessageDecoderTest method shouldCallExternalErrorOnLocalDateTime.
@ParameterizedTest
@MethodSource("argumentsProvider")
public void shouldCallExternalErrorOnLocalDateTime(Neo4jPack packerUnderTest) throws Exception {
this.packerUnderTest = packerUnderTest;
assumeThat(packerUnderTest.version()).isEqualTo(1);
testUnpackableStructParametersWithKnownType(new Neo4jPackV2(), ValueUtils.of(LocalDateTime.now()), "LocalDateTime values cannot be unpacked with this version of bolt.");
}
use of org.neo4j.bolt.packstream.Neo4jPackV2 in project neo4j by neo4j.
the class MessageDecoderTest method shouldCallExternalErrorOnDateTimeWithZoneName.
@ParameterizedTest
@MethodSource("argumentsProvider")
public void shouldCallExternalErrorOnDateTimeWithZoneName(Neo4jPack packerUnderTest) throws Exception {
this.packerUnderTest = packerUnderTest;
assumeThat(packerUnderTest.version()).isEqualTo(1);
testUnpackableStructParametersWithKnownType(new Neo4jPackV2(), ValueUtils.of(ZonedDateTime.now()), "ZonedDateTime values cannot be unpacked with this version of bolt.");
}
Aggregations