Search in sources :

Example 1 with Neo4jPackV2

use of org.neo4j.bolt.packstream.Neo4jPackV2 in project neo4j by neo4j.

the class SupportedStructTypesV2IT method setup.

@BeforeEach
public void setup(TestInfo testInfo) throws IOException {
    server.setConfigure(withOptionalBoltEncryption());
    server.init(testInfo);
    address = server.lookupDefaultConnector();
    util = new TransportTestUtil(new Neo4jPackV2());
}
Also used : TransportTestUtil(org.neo4j.bolt.testing.TransportTestUtil) Neo4jPackV2(org.neo4j.bolt.packstream.Neo4jPackV2) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 2 with Neo4jPackV2

use of org.neo4j.bolt.packstream.Neo4jPackV2 in project neo4j by neo4j.

the class MessageDecoderTest method shouldCallExternalErrorOnDuration.

@ParameterizedTest
@MethodSource("argumentsProvider")
public void shouldCallExternalErrorOnDuration(Neo4jPack packerUnderTest) throws Exception {
    this.packerUnderTest = packerUnderTest;
    assumeThat(packerUnderTest.version()).isEqualTo(1);
    testUnpackableStructParametersWithKnownType(new Neo4jPackV2(), durationValue(Duration.ofDays(10)), "Duration values cannot be unpacked with this version of bolt.");
}
Also used : Neo4jPackV2(org.neo4j.bolt.packstream.Neo4jPackV2) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) MethodSource(org.junit.jupiter.params.provider.MethodSource)

Example 3 with Neo4jPackV2

use of org.neo4j.bolt.packstream.Neo4jPackV2 in project neo4j by neo4j.

the class MessageDecoderTest method shouldCallExternalErrorOnLocalTime.

@ParameterizedTest
@MethodSource("argumentsProvider")
public void shouldCallExternalErrorOnLocalTime(Neo4jPack packerUnderTest) throws Exception {
    this.packerUnderTest = packerUnderTest;
    assumeThat(packerUnderTest.version()).isEqualTo(1);
    testUnpackableStructParametersWithKnownType(new Neo4jPackV2(), ValueUtils.of(LocalTime.now()), "LocalTime values cannot be unpacked with this version of bolt.");
}
Also used : Neo4jPackV2(org.neo4j.bolt.packstream.Neo4jPackV2) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) MethodSource(org.junit.jupiter.params.provider.MethodSource)

Example 4 with Neo4jPackV2

use of org.neo4j.bolt.packstream.Neo4jPackV2 in project neo4j by neo4j.

the class MessageDecoderTest method shouldCallExternalErrorOnDate.

@ParameterizedTest
@MethodSource("argumentsProvider")
public void shouldCallExternalErrorOnDate(Neo4jPack packerUnderTest) throws Exception {
    this.packerUnderTest = packerUnderTest;
    assumeThat(packerUnderTest.version()).isEqualTo(1);
    testUnpackableStructParametersWithKnownType(new Neo4jPackV2(), ValueUtils.of(LocalDate.now()), "LocalDate values cannot be unpacked with this version of bolt.");
}
Also used : Neo4jPackV2(org.neo4j.bolt.packstream.Neo4jPackV2) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) MethodSource(org.junit.jupiter.params.provider.MethodSource)

Example 5 with Neo4jPackV2

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.");
}
Also used : Neo4jPackV2(org.neo4j.bolt.packstream.Neo4jPackV2) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) MethodSource(org.junit.jupiter.params.provider.MethodSource)

Aggregations

Neo4jPackV2 (org.neo4j.bolt.packstream.Neo4jPackV2)10 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)7 MethodSource (org.junit.jupiter.params.provider.MethodSource)7 BeforeEach (org.junit.jupiter.api.BeforeEach)2 TransportTestUtil (org.neo4j.bolt.testing.TransportTestUtil)2 Neo4jPack (org.neo4j.bolt.packstream.Neo4jPack)1 PackedOutputArray (org.neo4j.bolt.packstream.PackedOutputArray)1