Exemplo n.º 1
0
Arquivo: query.hpp Projeto: cawka/ndns
 bool
 operator==(const Query& other) const
 {
   return (getHint() == other.getHint() && getZone() == other.getZone() &&
     getQueryType() == other.getQueryType() && getRrLabel() == other.getRrLabel() &&
     getRrType() == other.getRrType());
 }
TEST(QueryTest, Hint) {
    Query q;
    q.hint(BSON("a" << 1));
    BSONElement hint = q.getHint();
    ASSERT_TRUE(hint.Obj().hasField("a"));
    ASSERT_EQUALS(hint.Obj().getIntField("a"), 1);
}