use of com.google.cloud.spanner.pgadapter.parsers.TimestampParser in project pgadapter by GoogleCloudPlatform.
the class ParserTest method testTimestampParsingBytePart.
@Test
public void testTimestampParsingBytePart() {
Timestamp value = Timestamp.ofTimeMicroseconds(904910400000000L);
byte[] byteResult = { -1, -1, -38, 1, -93, -70, 48, 0 };
Parser parsedValue = new TimestampParser(value);
assertThat(parsedValue.parse(DataFormat.POSTGRESQL_BINARY), is(equalTo(byteResult)));
validateCreateBinary(byteResult, Oid.TIMESTAMP, value);
}
Aggregations