public void Filter_SetsCorrectTypeForString(string value) { var service = _service.Filter(x => x.StringProperty, value) as ElasticSearchService <ComplexType>; Filter result = service.PostFilters.Single(f => f.FieldName == "StringProperty"); Assert.Equal(value, result.Value); Assert.Equal(typeof(String).Name, result.Type.Name); }