WithinRectangle() public static method

Tests that the value of the named element is within a rectangle (see $within and $box).
public static WithinRectangle ( string name, double lowerLeftX, double lowerLeftY, double upperRightX, double upperRightY ) : QueryConditionList
name string The name of the element to test.
lowerLeftX double The x coordinate of the lower left corner.
lowerLeftY double The y coordinate of the lower left corner.
upperRightX double The x coordinate of the upper right corner.
upperRightY double The y coordinate of the upper right corner.
return QueryConditionList
        public void TestWithinRectangle()
        {
            var query    = Query.WithinRectangle("loc", 1.1, 2.2, 3.3, 4.4);
            var expected = "{ 'loc' : { '$within' : { '$box' : [[1.1, 2.2], [3.3, 4.4]] } } }".Replace("'", "\"");

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