diff --git a/sdk/storagecache/Microsoft.Azure.Management.StorageCache/src/Customizations/StorageCacheManagementClient.cs b/sdk/storagecache/Microsoft.Azure.Management.StorageCache/src/Customizations/StorageCacheManagementClient.cs new file mode 100644 index 000000000000..c2692ba96603 --- /dev/null +++ b/sdk/storagecache/Microsoft.Azure.Management.StorageCache/src/Customizations/StorageCacheManagementClient.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. + +using System; +//using Microsoft.Azure.Management.BotService.Customizations; +//..using Microsoft.IdentityModel.Clients.ActiveDirectory; +using Microsoft.Azure.Management.StorageCache; + +namespace Microsoft.Azure.Management.StorageCache +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Net; + using System.Net.Http; + + /// + /// A Storage Cache provides scalable caching service for NAS clients, + /// serving data from either NFSv3 or Blob at-rest storage (referred to as + /// "Storage Targets"). These operations allow you to manage Caches. + /// + public partial class StorageCacheManagementClient : ServiceClient, IStorageCacheManagementClient + { + + partial void CustomInitialize() + { + // Override the bot services operations with an augmented bot services operations, + // which includes operations required to complete the provisioning of the bot + this.ApiVersion = "2021-03-01"; + } + } +} diff --git a/sdk/storagecache/Microsoft.Azure.Management.StorageCache/tests/CustomizationTests.cs b/sdk/storagecache/Microsoft.Azure.Management.StorageCache/tests/CustomizationTests.cs new file mode 100644 index 000000000000..ba20bf55c28a --- /dev/null +++ b/sdk/storagecache/Microsoft.Azure.Management.StorageCache/tests/CustomizationTests.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +namespace Microsoft.Azure.Management.StorageCache.Tests +{ + using System.Collections.Generic; + using Microsoft.Azure.Management.StorageCache.Models; + using Microsoft.Azure.Management.StorageCache.Tests.Fixtures; + using Microsoft.Azure.Management.StorageCache.Tests.Utilities; + using Microsoft.Azure.Test.HttpRecorder; + using Microsoft.Rest; + using Xunit; + using Xunit.Abstractions; + + /// + /// Defines the . + /// + [Collection("StorageCacheCollection")] + public class CustomizationTests + { + /// + /// Defines the testOutputHelper. + /// + private readonly ITestOutputHelper testOutputHelper; + + /// + /// Initializes a new instance of the class. + /// + /// The testOutputHelper. + public CustomizationTests(ITestOutputHelper testOutputHelper) + { + this.testOutputHelper = testOutputHelper; + } + + /// + /// Verify the ApiVersion property of the client is default to the correct version." + /// + [Fact] + public void TestApiVersion() + { + RecordedDelegatingHandler recordedDelegatingHandlers = new RecordedDelegatingHandler(); + ServiceClientCredentials credentials = new TokenCredentials("abc"); + StorageCacheManagementClient storageCacheManagementClient = new StorageCacheManagementClient(credentials, recordedDelegatingHandlers); + Assert.Equal(Constants.DefaultAPIVersion, storageCacheManagementClient.ApiVersion); + } + } +} \ No newline at end of file