Пример #1
0
        public void TestSetUp()
        {
            var uriFactory = new UriFactory(new Uri("http://localhost:6789/api/"));

            _mockHttpService = MockRepository.GenerateStub <IHttpService>();
            var queryFactory = new DefaultODataQueryFactory();

            var queryModelTranslator = new RestQueryModelVisitor(queryFactory);

            var restQueryableFactory = new RestQueryableFactory(_mockHttpService, queryModelTranslator);

            _endpoint = new Endpoint(restQueryableFactory, _mockHttpService, uriFactory);
        }
Пример #2
0
        public void TestSetUp()
        {
            _host = TestServer.Create <Startup>();

            var uriFactory   = new UriFactory(new Uri("http://localhost:6789/api/"));
            var queryFactory = new DefaultODataQueryFactory();

            var httpService = new RequestBuilderHttpService(_host);

            var queryModelTranslator = new RestQueryModelVisitor(queryFactory);

            var restQueryableFactory = new RestQueryableFactory(httpService, queryModelTranslator);

            _endpoint = new Endpoint(restQueryableFactory, httpService, uriFactory);
        }