use of org.bson.BsonBoolean in project mongo-java-driver by mongodb.
the class CommandResultTest method shouldNotHaveExceptionWhenOkIsTrue.
@Test
public void shouldNotHaveExceptionWhenOkIsTrue() throws UnknownHostException {
CommandResult commandResult = new CommandResult(new BsonDocument("ok", new BsonBoolean(true)));
assertNull(commandResult.getException());
}
use of org.bson.BsonBoolean in project drill by apache.
the class TestBsonRecordReader method testBooleanType.
@Test
public void testBooleanType() throws IOException {
BsonDocument bsonDoc = new BsonDocument();
bsonDoc.append("booleanKey", new BsonBoolean(true));
writer.reset();
bsonReader.write(writer, new BsonDocumentReader(bsonDoc));
SingleMapReaderImpl mapReader = (SingleMapReaderImpl) writer.getMapVector().getReader();
assertTrue(mapReader.reader("booleanKey").readBoolean());
}
Aggregations