Exemple #1
0
        public void GetNavigationSource_ReturnsNull_UnboundActionPrimitveReturnType()
        {
            // Arrange
            IEdmActionImport         action  = _container.FindOperationImports("MyAction").SingleOrDefault() as IEdmActionImport;
            UnboundActionPathSegment segment = new UnboundActionPathSegment(action);

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

            // Assert
            Assert.Null(result);
        }
Exemple #2
0
        public void GetNavigationSource_ReturnsNotNull_UnboundActionEntityset()
        {
            // Arrange
            IEdmActionImport action = _container.FindOperationImports("CreateCustomer").SingleOrDefault() as IEdmActionImport;

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

            // Assert
            Assert.NotNull(result);
            Assert.Equal("System.Web.OData.Routing.MyCustomer", result.EntityType().FullName());
        }
        public void GetNavigationSource_ReturnsNull_UnboundActionPrimitveReturnType()
        {
            // Arrange
            IEdmActionImport action = _container.FindOperationImports("MyAction").SingleOrDefault() as IEdmActionImport;
            UnboundActionPathSegment segment = new UnboundActionPathSegment(action);

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

            // Assert
            Assert.Null(result);
        }
        public void GetNavigationSource_ReturnsNotNull_UnboundActionEntityset()
        {
            // Arrange
            IEdmActionImport action = _container.FindOperationImports("CreateCustomer").SingleOrDefault() as IEdmActionImport;

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

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