public static Near ( string name, double x, double y ) : |
||
name | string | The name of the element to test. |
x | double | The x value of the origin. |
y | double | The y value of the origin. |
Résultat |
public void TestNearWithSphericalTrue() { var query = Query.Near("loc", 1.1, 2.2, 3.3, true); var expected = "{ 'loc' : { '$nearSphere' : [1.1, 2.2], '$maxDistance' : 3.3 } }".Replace("'", "\""); Assert.AreEqual(expected, query.ToJson()); }
public void TestNear() { var query = Query.Near("loc", 1.1, 2.2); var expected = "{ 'loc' : { '$near' : [1.1, 2.2] } }".Replace("'", "\""); Assert.AreEqual(expected, query.ToJson()); }