public void GetTemplatesFunctionImportSegmentTemplate_ReturnsTemplates()
        {
            // Arrange
            FunctionImportSegmentTemplate functionImportSegment = new FunctionImportSegmentTemplate(_functionImport, null);

            // Act & Assert
            IEnumerable <string> templates = functionImportSegment.GetTemplates();
            string template = Assert.Single(templates);

            Assert.Equal("/MyFunctionImport(name={name},title={title})", template);
            Assert.Null(functionImportSegment.NavigationSource);
        }
        public void GetTemplatesFunctionImportSegmentTemplate_ReturnsTemplates_ForEmptyParameter()
        {
            // Arrange
            EdmFunction                   function              = new EdmFunction("NS", "MyFunctionImport", IntPrimitive, false, null, false);
            EdmEntityContainer            container             = new EdmEntityContainer("NS", "Default");
            EdmFunctionImport             functionImport        = new EdmFunctionImport(container, "MyFunctionImport", function);
            FunctionImportSegmentTemplate functionImportSegment = new FunctionImportSegmentTemplate(functionImport, null);

            // Act & Assert
            IEnumerable <string> templates = functionImportSegment.GetTemplates();
            string template = Assert.Single(templates);

            Assert.Equal("/MyFunctionImport()", template);

            // Act & Assert
            templates = functionImportSegment.GetTemplates(new ODataRouteOptions
            {
                EnableNonParenthesisForEmptyParameterFunction = true
            });
            template = Assert.Single(templates);
            Assert.Equal("/MyFunctionImport", template);
        }