public void GeographyFromBinary_produces_correct_EdmFunction() { var argument = DbExpressionBuilder.Constant(new byte[] { 0x00, 0x01 }); var function = SpatialEdmFunctions.GeographyFromBinary(argument); Assert.Equal("GeographyFromBinary", function.Function.FunctionName); Assert.Same(argument, function.Arguments[0]); }
public void GeometryFromGml_with_coordinate_id_produces_correct_EdmFunction() { var argument1 = DbExpressionBuilder.Constant("<gml>some GML</gml>"); var argument2 = DbExpressionBuilder.Constant(1); var function = SpatialEdmFunctions.GeometryFromGml(argument1, argument2); Assert.Equal("GeometryFromGml", function.Function.FunctionName); Assert.Same(argument1, function.Arguments[0]); Assert.Same(argument2, function.Arguments[1]); }
public void SpatialRelate_produces_correct_EdmFunction() { var argument1 = DbExpressionBuilder.Constant(DbGeometry.FromText("POINT(1 1)")); var argument2 = DbExpressionBuilder.Constant(DbGeometry.FromText("POINT(2 2)")); var argument3 = DbExpressionBuilder.Constant("intersection pattern"); var function = SpatialEdmFunctions.SpatialRelate(argument1, argument2, argument3); Assert.Equal("SpatialRelate", function.Function.FunctionName); Assert.Same(argument1, function.Arguments[0]); Assert.Same(argument2, function.Arguments[1]); Assert.Same(argument3, function.Arguments[2]); }