예제 #1
0
        public void DistanceOnlyWorksBetweenTwoPoints()
        {
            string functionName = "geo.distance";

            FunctionSignatureWithReturnType[] signatures = FunctionCallBinder.GetBuiltInFunctionSignatures(functionName);
            Action parseDistanceWithNonPointOperand      = () => ParseFilter("geo.distance(LocationGeometryLine, geometry'POINT(10 30)') eq 2", HardCodedTestModel.TestModel, HardCodedTestModel.GetPersonType(), HardCodedTestModel.GetPeopleSet());

            parseDistanceWithNonPointOperand.ShouldThrow <ODataException>(ODataErrorStrings.MetadataBinder_NoApplicableFunctionFound(functionName, BuiltInFunctions.BuildFunctionSignatureListDescription(functionName, signatures)));
        }