Beispiel #1
0
        public void when_making_url_segments_with_one_parameter_using_expando_object_it_should_have_the_correct_url_parameters()
        {
            var     objectToUrlSegments = new ObjectToUrlSegments();
            dynamic parameters          = new ExpandoObject();

            parameters.Name = "test";

            var url = objectToUrlSegments.ParametersToUrl(parameters);

            Assert.AreEqual("/test", url);
        }
Beispiel #2
0
        public void when_making_url_segments_with_two_parameters_using_static_object_it_should_have_the_correct_url_segments()
        {
            var     _objectToUrlSegments = new ObjectToUrlSegments();
            dynamic parameter            = new DynamicObjectToUrlSpecs.StaticObjectWithNameAndId()
            {
                Name = "test", Id = 1
            };

            var url = _objectToUrlSegments.ParametersToUrl(parameter);

            Assert.AreEqual("/test/1", url);
        }