public static WithinCircle ( string name, double centerX, double centerY, double radius ) : |
||
name | string | The name of the element to test. |
centerX | double | The x coordinate of the origin. |
centerY | double | The y coordinate of the origin. |
radius | double | The radius of the circle. |
Результат |
public void TestWithinCircleSpherical() { var query = Query.WithinCircle("loc", 1.1, 2.2, 3.3, true); var expected = "{ 'loc' : { '$within' : { '$centerSphere' : [[1.1, 2.2], 3.3] } } }".Replace("'", "\""); Assert.AreEqual(expected, query.ToJson()); }