public void FilterGeoDistance_SetsCorrectTypeAndCoords() { var center = (59.9277542, 10.7190847); var service = _service.FilterGeoDistance(x => x.GeoPointProperty, "123km", center) as ElasticSearchService <ComplexType>; Filter result = service.PostFilters.Single(f => f.FieldName == nameof(ComplexType.GeoPointProperty)); var value = result.Value as GeoDistance; Assert.True(result.Type == typeof(GeoPoint)); Assert.Equal("123km", value.Distance); Assert.Equal(center.Item1, value.Point.Lat); Assert.Equal(center.Item2, value.Point.Lon); }