public void When_the_verb_is_POST_the_Concrete_passes_parameters_on_the_URI_and_in_the_body()
        {
            Init(m =>
            {
                Method = Any.OdcmMethodPost();
                Method.Class = Class;
                Method.ReturnType = null;
                Method.IsCollection = false;
                Class.Methods.Add(Method);
            });

            var entityKeyValues = Class.GetSampleKeyArguments().ToArray();
            var instancePath = Class.GetDefaultEntityPath(entityKeyValues);

            using (var mockService = new MockService(true)
                    .SetupPostEntity(TargetEntity, entityKeyValues)
)
            {
                var concrete = mockService
                    .GetDefaultContext(Model)
                    .CreateConcrete(ConcreteType);

                mockService.ValidateParameterPassing("POST", concrete, instancePath, Method, 
                    ServerMethodNameGenerator(), null);
            }
        }

        [Fact]
        public void When_the_verb_is_GET_the_Fetcher_passes_parameters_on_the_URI()
        {
            Init(m =>
            {
                Method = Any.OdcmMethodGet();
                Method.Class = Class;
                Method.ReturnType = null;
                Method.IsCollection = false;
                Class.Methods.Add(Method);
            });

            var entityKeyValues = Class.GetSampleKeyArguments().ToArray();
            var fetcherPath = Class.GetDefaultEntityPath(entityKeyValues);

            using (var mockService = new MockService()
)
            {
                var fetcher = mockService
                    .GetDefaultContext(Model)
                    .CreateFetcher(FetcherType, fetcherPath);
        public void When_the_verb_is_GET_the_Collection_passes_parameters_on_the_URI()
        {
            Init(model =>
            {
                Method = Any.OdcmMethodGet();
                Method.Class = model.EntityContainer;
                Method.ReturnType = Class;
                Method.IsCollection = false;
                Method.IsBoundToCollection = false;
                model.EntityContainer.Methods.Add(Method);
            });

            using (var mockService = new MockService())
            {
                var service = mockService
                    .CreateContainer(EntityContainerType);

                mockService.ValidateParameterPassing("GET", service, "", Method, ServerMethodNameGenerator(),
                    TargetEntity);
            }
        }
        public void When_the_verb_is_POST_the_Collection_passes_parameters_on_the_URI_and_in_the_body()
        {
            Init(m =>
            {
                Method = Any.OdcmMethodPost();
                Method.Class = Class;
                Method.ReturnType = null;
                Method.IsCollection = false;
                Method.IsBoundToCollection = true;
                Class.Methods.Add(Method);
            });

            using (var mockService = new MockService(true))
            {
                var collectionPath = Any.UriPath(1);

                var collection = mockService
                    .GetDefaultContext(Model)
                    .CreateCollection(CollectionType, ConcreteType, collectionPath);

                mockService.ValidateParameterPassing("POST", collection, "/" + collectionPath, Method,
                    ServerMethodNameGenerator(), null);
            }
        }
        public void When_the_verb_is_GET_the_Collection_passes_parameters_on_the_URI()
        {
            base.Init(m =>
            {
                Method = Any.OdcmMethodGet();
                Method.Class = Class;
                Method.ReturnType = Class;
                Method.IsCollection = IsCollection;
                Method.IsBoundToCollection = true;
                Class.Methods.Add(Method);
            });

            var collectionPath = Any.UriPath(1);

            using (var mockService = new MockService())
            {
                var collection = mockService
                    .GetDefaultContext(Model)
                    .CreateCollection(CollectionType, ConcreteType, collectionPath);

                mockService.ValidateParameterPassing("GET", collection, "/" + collectionPath, Method,
                    ServerMethodNameGenerator(), TargetEntity);
            }
        }