public void SelectAction_ReturnsTheActionName_ForSingletonActionBoundToEntity()
        {
            // Arrange
            ActionRoutingConvention actionConvention = new ActionRoutingConvention();
            IEdmModel model     = new CustomersModelWithInheritance().Model;
            ODataPath odataPath = new DefaultODataPathHandler().Parse(model, _serviceRoot, "VipCustomer/NS.upgrade");
            var       request   = RequestFactory.Create(HttpMethod.Post, "http://localhost/");
            var       actionMap = SelectActionHelper.CreateActionMap("upgrade");

            // Act
            string selectedAction = SelectActionHelper.SelectAction(new ActionRoutingConvention(), odataPath, request, actionMap);

            // Assert
            Assert.Equal("upgrade", selectedAction);
            Assert.Empty(SelectActionHelper.GetRouteData(request).Values);
        }
        public void SelectAction_ReturnsTheActionName_ForEntitySetActionBoundToEntitySet()
        {
            // Arrange
            ActionRoutingConvention actionConvention = new ActionRoutingConvention();
            IEdmModel model     = ODataRoutingModel.GetModel();
            ODataPath odataPath = new DefaultODataPathHandler().Parse(model, _serviceRoot, "RoutingCustomers/Default.GetVIPs");
            var       request   = RequestFactory.Create(HttpMethod.Post, "http://localhost/");
            var       actionMap = SelectActionHelper.CreateActionMap("GetVIPs");

            // Act
            string selectedAction = SelectActionHelper.SelectAction(new ActionRoutingConvention(), odataPath, request, actionMap);

            // Assert
            Assert.Equal("GetVIPs", selectedAction);
            Assert.Empty(SelectActionHelper.GetRouteData(request).Values);
        }