Beispiel #1
0
        public void AppliesToEndpoints_EndpointWithoutODataRoutingMetadata_ReturnsFalse()
        {
            // Arrange
            Endpoint[] endpoints = new[] { CreateEndpoint("/", null), };

            ODataRoutingMatcherPolicy policy = CreatePolicy();

            // Act
            bool result = policy.AppliesToEndpoints(endpoints);

            // Assert
            Assert.False(result);
        }
Beispiel #2
0
        public void AppliesToEndpoints_EndpointHasODataRoutingMetadata_ReturnsTrue()
        {
            // Arrange
            IODataRoutingMetadata routingMetadata = new ODataRoutingMetadata();

            Endpoint[] endpoints = new[]
            {
                CreateEndpoint("/", routingMetadata),
                CreateEndpoint("/", null),
            };

            ODataRoutingMatcherPolicy policy = CreatePolicy();

            // Act
            bool result = policy.AppliesToEndpoints(endpoints);

            // Assert
            Assert.True(result);
        }