public void GetNavigationSource_ReturnsNull_UnboundFunctionEntitySetType()
        {
            // Arrange
            IEdmFunctionImport         functionImport = _container.FindOperationImports("MyFunction").SingleOrDefault() as IEdmFunctionImport;
            UnboundFunctionPathSegment segment        = new UnboundFunctionPathSegment(functionImport, _model, parameterValues: null);

            // Act
            var result = segment.GetNavigationSource(previousNavigationSource: null);

            // Assert
            Assert.Null(result);
        }
        public void GetNavigationSource_ReturnsNotNull_UnboundFunctionEntitySetType()
        {
            // Arrange
            IEdmFunctionImport         functionImport = _container.FindOperationImports("TopCustomer").SingleOrDefault() as IEdmFunctionImport;
            UnboundFunctionPathSegment segment        = new UnboundFunctionPathSegment(functionImport, _model, parameterValues: null);

            // Act
            var result = segment.GetNavigationSource(previousNavigationSource: null);

            // Assert
            Assert.NotNull(result);
            Assert.Equal("System.Web.OData.Routing.MyCustomer", result.EntityType().FullName());
        }
        public void GetNavigationSource_ReturnsNull_UnboundFunctionEntitySetType()
        {
            // Arrange
            IEdmFunctionImport functionImport = _container.FindOperationImports("MyFunction").SingleOrDefault() as IEdmFunctionImport;
            UnboundFunctionPathSegment segment = new UnboundFunctionPathSegment(functionImport, _model, parameterValues: null);

            // Act
            var result = segment.GetNavigationSource(previousNavigationSource: null);

            // Assert
            Assert.Null(result);
        }
        public void GetNavigationSource_ReturnsNotNull_UnboundFunctionEntitySetType()
        {
            // Arrange
            IEdmFunctionImport functionImport = _container.FindOperationImports("TopCustomer").SingleOrDefault() as IEdmFunctionImport;
            UnboundFunctionPathSegment segment = new UnboundFunctionPathSegment(functionImport, _model, parameterValues: null);

            // Act
            var result = segment.GetNavigationSource(previousNavigationSource: null);

            // Assert
            Assert.NotNull(result);
            Assert.Equal("System.Web.OData.Routing.MyCustomer", result.EntityType().FullName());
        }