Esempio n. 1
0
        public void substitute_on_route_parameter()
        {
            var parameters = new RouteParameters <FakeInput>();

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

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