Example #1
0
        public void BoundAction_DoesNotMatch_WhenOtherBoundActionIsNull()
        {
            var actionParameters = new RouteValueDictionary
            {
                { "param1", "test" },
                { "param2", "test2" }
            };

            var boundAction = new BoundAction("testController", "action", actionParameters);

            Assert.That(boundAction.Matches(null), Is.False);
        }
Example #2
0
        public void BoundAction_DoesNotMatch_WhenRouteMatchesButParametersDoNot()
        {
            var actionParameters = new RouteValueDictionary
            {
                { "param1", "test" },
                { "param2", "test2" }
            };

            var otherActionParameters = new RouteValueDictionary
            {
                { "param1", "test" },
            };

            var boundAction      = new BoundAction("testController", "action", actionParameters);
            var otherBoundAction = new BoundAction("testController", "ACTION", otherActionParameters);

            Assert.That(boundAction.Matches(otherBoundAction), Is.False);
        }
Example #3
0
        public void BoundAction_Matches_WhenRouteAndParametersMatch_And_CaseIsDifferent()
        {
            var actionParameters = new RouteValueDictionary
            {
                { "param1", "test" },
                { "param2", "test2" }
            };

            var otherActionParameters = new RouteValueDictionary
            {
                { "param1", "TEST" },
                { "PARAM2", "test2" }
            };

            var boundAction      = new BoundAction("TESTCONTROLLER", "action", actionParameters);
            var otherBoundAction = new BoundAction("testController", "ACTION", otherActionParameters);

            Assert.That(boundAction.Matches(otherBoundAction), Is.True);
        }
Example #4
0
        public void BoundAction_Matches_WhenRouteAndParametersMatch()
        {
            var actionParameters = new RouteValueDictionary
            {
                { "param1", "test" },
                { "param2", "test2" }
            };

            var otherActionParameters = new RouteValueDictionary
            {
                { "param1", "test" },
                { "param2", "test2" }
            };

            var boundAction      = new BoundAction("testController", "action", actionParameters);
            var otherBoundAction = new BoundAction("testController", "action", otherActionParameters);

            Assert.That(boundAction.Matches(otherBoundAction), Is.True);
        }