コード例 #1
0
TEST(CollectionOptions, IsValid) {
    CollectionOptions options;
    ASSERT_TRUE(options.isValid());

    options.storageEngine = fromjson("{storageEngine1: 1}");
    ASSERT_FALSE(options.isValid());
}
コード例 #2
0
TEST(CollectionOptions, CollationFieldParsesCorrectly) {
    CollectionOptions options;
    ASSERT_OK(options.parse(fromjson("{collation: {locale: 'en'}}")));
    ASSERT_EQ(options.collation, fromjson("{locale: 'en'}"));
    ASSERT_TRUE(options.isValid());
    ASSERT_OK(options.validate());
}