| | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 2 | | // Licensed under the MIT License. See License.txt in the project root for |
| | 3 | | // license information. |
| | 4 | |
|
| | 5 | | namespace Microsoft.Azure.Management.Search.Tests |
| | 6 | | { |
| | 7 | | using System; |
| | 8 | | using System.Net; |
| | 9 | | using Management.Search; |
| | 10 | | using Management.Search.Models; |
| | 11 | | using Microsoft.Azure.Search.Tests.Utilities; |
| | 12 | | using Xunit; |
| | 13 | |
|
| | 14 | | public sealed class SearchManagementClientTests : SearchTestBase<ResourceGroupFixture> |
| | 15 | | { |
| | 16 | | [Fact] |
| | 17 | | public void RequestIdIsReturnedInResponse() |
| | 18 | | { |
| 0 | 19 | | Run(() => |
| 0 | 20 | | { |
| 0 | 21 | | SearchManagementClient client = GetSearchManagementClient(); |
| 0 | 22 | |
|
| 0 | 23 | | // We need to use a constant GUID so that this test will still work in playback mode. |
| 0 | 24 | | var options = new SearchManagementRequestOptions(new Guid("c4cfce79-eb42-4e61-9909-84510c04706f")); |
| 0 | 25 | |
|
| 0 | 26 | | var listResponse = |
| 0 | 27 | | client.Services.ListByResourceGroupWithHttpMessagesAsync(Data.ResourceGroupName, searchManagementReq |
| 0 | 28 | | Assert.Equal(HttpStatusCode.OK, listResponse.Response.StatusCode); |
| 0 | 29 | |
|
| 0 | 30 | | Assert.Equal(options.ClientRequestId.Value.ToString("D"), listResponse.RequestId); |
| 0 | 31 | | }); |
| 0 | 32 | | } |
| | 33 | | } |
| | 34 | | } |