use of com.google.cloud.spanner.pgadapter.parsers.BooleanParser in project pgadapter by GoogleCloudPlatform.
the class ParserTest method testFalseBooleanParsing.
@Test
public void testFalseBooleanParsing() {
boolean value = false;
byte[] byteResult = { 0 };
byte[] stringResult = { 'f' };
byte[] spannerResult = { 'f', 'a', 'l', 's', 'e' };
Parser parsedValue = new BooleanParser(value);
validate(parsedValue, byteResult, stringResult, spannerResult);
validateCreateBinary(byteResult, Oid.BIT, value);
validateCreateText(stringResult, Oid.BIT, value);
}
use of com.google.cloud.spanner.pgadapter.parsers.BooleanParser in project pgadapter by GoogleCloudPlatform.
the class ParserTest method testTrueBooleanParsing.
@Test
public void testTrueBooleanParsing() {
boolean value = true;
byte[] byteResult = { 1 };
byte[] stringResult = { 't' };
byte[] spannerResult = { 't', 'r', 'u', 'e' };
Parser parsedValue = new BooleanParser(value);
validate(parsedValue, byteResult, stringResult, spannerResult);
validateCreateBinary(byteResult, Oid.BIT, value);
validateCreateText(stringResult, Oid.BIT, value);
}
Aggregations