예제 #1
0
        private static FluentClient CreateClient(FakeResponseMode mode = FakeResponseMode.Capture)
        {
            var serializer = new JsonContentSerializer();
            var fakeHttp = new FakeMessageHandler { Mode = mode };

            var client = new FluentClient(serializer, fakeHttp);
            return client;
        }
예제 #2
0
        private static FluentClient CreateClient()
        {
            var serializer = new JsonContentSerializer();

            var fakeStore = MemoryMessageStore.Current;
            var fakeHttp = new FakeMessageHandler(fakeStore, FakeResponseMode.Fake);

            var client = new FluentClient(serializer, fakeHttp);
            client.BaseUri = new Uri("http://httpbin.org/", UriKind.Absolute);

            return client;
        }
예제 #3
0
        private static FluentClient CreateClient()
        {
            var serializer = new JsonContentSerializer();

            var fakeStore = new FileMessageStore();
            fakeStore.StorePath = @".\GitHub\Responses";

            var fakeHttp = new FakeMessageHandler(fakeStore, FakeResponseMode.Fake);

            var client = new FluentClient(serializer, fakeHttp);
            client.BaseUri = new Uri("https://api.github.com/", UriKind.Absolute);

            return client;
        }