Ejemplo n.º 1
0
        public void RequestIdIsReturnedInResponse()
        {
            Run(() =>
            {
                SearchIndexClient client = Data.GetSearchIndexClient();

                // We need to use a constant GUID so that this test will still work in playback mode.
                Guid myRequestId = new Guid("c4cfce79-eb42-4e61-9909-84510c04706f");
                client.SetClientRequestId(myRequestId);

                DocumentCountResponse countResponse = client.Documents.Count();
                Assert.Equal(HttpStatusCode.OK, countResponse.StatusCode);

                Assert.Equal(myRequestId.ToString(), countResponse.RequestId);
            });
        }