コード例 #1
0
        public Execute(Request.Execute request, CallSettings callSettings)
        {
            _request = request;

            _callSettings         = callSettings;
            _callSettings.IsBulk  = false; // Force this call to be made as a single call
            _callSettings.IsBatch = request.Batch.GetValueOrDefault();
            if (_callSettings.Timeout == null)
            {
                callSettings.Timeout = 120000;
            }
            _url    = callSettings.ServerLocation + "/bulk/execute";
            _method = System.Net.Http.HttpMethod.Post;
        }
コード例 #2
0
        public async Task GetBooks()
        {
            System.Diagnostics.Debugger.Launch();
            var mockContext = CreateContext();
            var mapConfig   = new MapperConfiguration(cfg =>
            {
                cfg.AddProfile(new MappingTest());
            });

            var mapper = mapConfig.CreateMapper();

            var handler = new Request.Handler(mockContext.Object, mapper);

            Request.Execute request = new Request.Execute();


            var list = await handler.Handle(request, new System.Threading.CancellationToken());

            Assert.True(list.Any());
        }