Size() public static method

Tests that the size of the named array is equal to some value (see $size).
public static Size ( string name, int size ) : QueryConditionList
name string The name of the element to test.
size int The size to compare to.
return QueryConditionList
        public void TestSizeAndAll()
        {
            var query    = Query.Size("k", 20).All(7, 11);
            var expected = "{ \"k\" : { \"$size\" : 20, \"$all\" : [7, 11] } }";

            Assert.AreEqual(expected, query.ToJson());
        }
        public void TestSize()
        {
            var query    = Query.Size("k", 20);
            var expected = "{ \"k\" : { \"$size\" : 20 } }";

            Assert.AreEqual(expected, query.ToJson());
        }