Example #1
0
        public void substitute_on_route_parameter()
        {
            var parameters = new RouteParameters <FakeInput>();

            parameters[x => x.Code] = "something";
            _input.Substitute(parameters, "aaa/{Code}/aaa").ShouldEqual("aaa/something/aaa");
        }
        public void route_input_should_substitute_method()
        {
            SingleProperty accessor  = SingleProperty.Build <SampleViewModel>(x => x.InPath);
            var            viewModel = new SampleViewModel
            {
                InPath = "5"
            };
            var routeInput = new RouteInput(accessor);

            routeInput.Substitute(viewModel, "test/edit/{InPath}").ShouldEqual("test/edit/5");
        }