-
Notifications
You must be signed in to change notification settings - Fork 741
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ParameterGrouping extension tests
- Only C#/NodeJS supported right now.
- Loading branch information
Showing
84 changed files
with
2,432 additions
and
251 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
198 changes: 198 additions & 0 deletions
198
...s/Expected/AcceptanceTests/AzureParameterGrouping/AutoRestParameterGroupingTestService.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,198 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. See License.txt in the project root for | ||
// license information. | ||
// | ||
// Code generated by Microsoft (R) AutoRest Code Generator 0.11.0.0 | ||
// Changes may cause incorrect behavior and will be lost if the code is | ||
// regenerated. | ||
|
||
namespace Fixtures.Azure.AcceptanceTestsAzureParameterGrouping | ||
{ | ||
using System; | ||
using System.Linq; | ||
using System.Collections.Generic; | ||
using System.Diagnostics; | ||
using System.Net; | ||
using System.Net.Http; | ||
using System.Net.Http.Headers; | ||
using System.Text; | ||
using System.Text.RegularExpressions; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
using Microsoft.Rest; | ||
using Microsoft.Rest.Serialization; | ||
using Newtonsoft.Json; | ||
using Microsoft.Rest.Azure; | ||
using Models; | ||
|
||
/// <summary> | ||
/// Test Infrastructure for AutoRest | ||
/// </summary> | ||
public partial class AutoRestParameterGroupingTestService : ServiceClient<AutoRestParameterGroupingTestService>, IAutoRestParameterGroupingTestService, IAzureClient | ||
{ | ||
/// <summary> | ||
/// The base URI of the service. | ||
/// </summary> | ||
public Uri BaseUri { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets json serialization settings. | ||
/// </summary> | ||
public JsonSerializerSettings SerializationSettings { get; private set; } | ||
|
||
/// <summary> | ||
/// Gets or sets json deserialization settings. | ||
/// </summary> | ||
public JsonSerializerSettings DeserializationSettings { get; private set; } | ||
|
||
/// <summary> | ||
/// The management credentials for Azure. | ||
/// </summary> | ||
public ServiceClientCredentials Credentials { get; private set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the preferred language for the response. | ||
/// </summary> | ||
public string AcceptLanguage { get; set; } | ||
|
||
/// <summary> | ||
/// The retry timeout for Long Running Operations. | ||
/// </summary> | ||
public int? LongRunningOperationRetryTimeout { get; set; } | ||
|
||
public virtual IParameterGroupingOperations ParameterGrouping { get; private set; } | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the AutoRestParameterGroupingTestService class. | ||
/// </summary> | ||
public AutoRestParameterGroupingTestService() : base() | ||
{ | ||
this.Initialize(); | ||
} | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the AutoRestParameterGroupingTestService class. | ||
/// </summary> | ||
/// <param name='handlers'> | ||
/// Optional. The set of delegating handlers to insert in the http | ||
/// client pipeline. | ||
/// </param> | ||
public AutoRestParameterGroupingTestService(params DelegatingHandler[] handlers) : base(handlers) | ||
{ | ||
this.Initialize(); | ||
} | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the AutoRestParameterGroupingTestService class. | ||
/// </summary> | ||
/// <param name='rootHandler'> | ||
/// Optional. The http client handler used to handle http transport. | ||
/// </param> | ||
/// <param name='handlers'> | ||
/// Optional. The set of delegating handlers to insert in the http | ||
/// client pipeline. | ||
/// </param> | ||
public AutoRestParameterGroupingTestService(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHandler, handlers) | ||
{ | ||
this.Initialize(); | ||
} | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the AutoRestParameterGroupingTestService class. | ||
/// </summary> | ||
/// <param name='baseUri'> | ||
/// Optional. The base URI of the service. | ||
/// </param> | ||
/// <param name='handlers'> | ||
/// Optional. The set of delegating handlers to insert in the http | ||
/// client pipeline. | ||
/// </param> | ||
public AutoRestParameterGroupingTestService(Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) | ||
{ | ||
if (baseUri == null) | ||
{ | ||
throw new ArgumentNullException("baseUri"); | ||
} | ||
this.BaseUri = baseUri; | ||
} | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the AutoRestParameterGroupingTestService class. | ||
/// </summary> | ||
/// <param name='credentials'> | ||
/// Required. The management credentials for Azure. | ||
/// </param> | ||
/// <param name='handlers'> | ||
/// Optional. The set of delegating handlers to insert in the http | ||
/// client pipeline. | ||
/// </param> | ||
public AutoRestParameterGroupingTestService(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) | ||
{ | ||
if (credentials == null) | ||
{ | ||
throw new ArgumentNullException("credentials"); | ||
} | ||
this.Credentials = credentials; | ||
} | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the AutoRestParameterGroupingTestService class. | ||
/// </summary> | ||
/// <param name='baseUri'> | ||
/// Optional. The base URI of the service. | ||
/// </param> | ||
/// <param name='credentials'> | ||
/// Required. The management credentials for Azure. | ||
/// </param> | ||
/// <param name='handlers'> | ||
/// Optional. The set of delegating handlers to insert in the http | ||
/// client pipeline. | ||
/// </param> | ||
public AutoRestParameterGroupingTestService(Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) | ||
{ | ||
if (baseUri == null) | ||
{ | ||
throw new ArgumentNullException("baseUri"); | ||
} | ||
if (credentials == null) | ||
{ | ||
throw new ArgumentNullException("credentials"); | ||
} | ||
this.BaseUri = baseUri; | ||
this.Credentials = credentials; | ||
} | ||
|
||
/// <summary> | ||
/// Initializes client properties. | ||
/// </summary> | ||
private void Initialize() | ||
{ | ||
this.ParameterGrouping = new ParameterGroupingOperations(this); | ||
this.BaseUri = new Uri("https://localhost"); | ||
this.AcceptLanguage = "en-US"; | ||
if (this.Credentials != null) | ||
{ | ||
this.Credentials.InitializeServiceClient(this); | ||
} | ||
SerializationSettings = new JsonSerializerSettings | ||
{ | ||
Formatting = Formatting.Indented, | ||
DateFormatHandling = DateFormatHandling.IsoDateFormat, | ||
DateTimeZoneHandling = DateTimeZoneHandling.Utc, | ||
NullValueHandling = NullValueHandling.Ignore, | ||
ReferenceLoopHandling = ReferenceLoopHandling.Serialize, | ||
ContractResolver = new ReadOnlyJsonContractResolver() | ||
}; | ||
SerializationSettings.Converters.Add(new ResourceJsonConverter()); | ||
DeserializationSettings = new JsonSerializerSettings{ | ||
DateFormatHandling = DateFormatHandling.IsoDateFormat, | ||
DateTimeZoneHandling = DateTimeZoneHandling.Utc, | ||
NullValueHandling = NullValueHandling.Ignore, | ||
ReferenceLoopHandling = ReferenceLoopHandling.Serialize, | ||
ContractResolver = new ReadOnlyJsonContractResolver() | ||
}; | ||
DeserializationSettings.Converters.Add(new ResourceJsonConverter()); | ||
DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); | ||
} | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
.../AcceptanceTests/AzureParameterGrouping/AutoRestParameterGroupingTestServiceExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. See License.txt in the project root for | ||
// license information. | ||
// | ||
// Code generated by Microsoft (R) AutoRest Code Generator 0.11.0.0 | ||
// Changes may cause incorrect behavior and will be lost if the code is | ||
// regenerated. | ||
|
||
namespace Fixtures.Azure.AcceptanceTestsAzureParameterGrouping | ||
{ | ||
using System; | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
using Microsoft.Rest; | ||
using Microsoft.Rest.Azure; | ||
using Models; | ||
|
||
public static partial class AutoRestParameterGroupingTestServiceExtensions | ||
{ | ||
} | ||
} |
60 changes: 60 additions & 0 deletions
60
.../Expected/AcceptanceTests/AzureParameterGrouping/IAutoRestParameterGroupingTestService.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. See License.txt in the project root for | ||
// license information. | ||
// | ||
// Code generated by Microsoft (R) AutoRest Code Generator 0.11.0.0 | ||
// Changes may cause incorrect behavior and will be lost if the code is | ||
// regenerated. | ||
|
||
namespace Fixtures.Azure.AcceptanceTestsAzureParameterGrouping | ||
{ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Net.Http; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
using Newtonsoft.Json; | ||
using Microsoft.Rest; | ||
using Microsoft.Rest.Azure; | ||
using Models; | ||
|
||
/// <summary> | ||
/// Test Infrastructure for AutoRest | ||
/// </summary> | ||
public partial interface IAutoRestParameterGroupingTestService | ||
{ | ||
/// <summary> | ||
/// The base URI of the service. | ||
/// </summary> | ||
Uri BaseUri { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets json serialization settings. | ||
/// </summary> | ||
JsonSerializerSettings SerializationSettings { get; } | ||
|
||
/// <summary> | ||
/// Gets or sets json deserialization settings. | ||
/// </summary> | ||
JsonSerializerSettings DeserializationSettings { get; } | ||
|
||
/// <summary> | ||
/// The management credentials for Azure. | ||
/// </summary> | ||
ServiceClientCredentials Credentials { get; } | ||
|
||
/// <summary> | ||
/// Gets or sets the preferred language for the response. | ||
/// </summary> | ||
string AcceptLanguage { get; set; } | ||
|
||
/// <summary> | ||
/// The retry timeout for Long Running Operations. | ||
/// </summary> | ||
int? LongRunningOperationRetryTimeout { get; set; } | ||
|
||
|
||
IParameterGroupingOperations ParameterGrouping { get; } | ||
|
||
} | ||
} |
52 changes: 52 additions & 0 deletions
52
...arp.Tests/Expected/AcceptanceTests/AzureParameterGrouping/IParameterGroupingOperations.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. See License.txt in the project root for | ||
// license information. | ||
// | ||
// Code generated by Microsoft (R) AutoRest Code Generator 0.11.0.0 | ||
// Changes may cause incorrect behavior and will be lost if the code is | ||
// regenerated. | ||
|
||
namespace Fixtures.Azure.AcceptanceTestsAzureParameterGrouping | ||
{ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Net.Http; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
using Microsoft.Rest; | ||
using Microsoft.Rest.Azure; | ||
using Models; | ||
|
||
/// <summary> | ||
/// ParameterGroupingOperations operations. | ||
/// </summary> | ||
public partial interface IParameterGroupingOperations | ||
{ | ||
/// <summary> | ||
/// Post a bunch of required parameters grouped | ||
/// </summary> | ||
/// <param name='parameters'> | ||
/// Additional parameters for the operation | ||
/// </param> | ||
/// <param name='customHeaders'> | ||
/// The headers that will be added to request. | ||
/// </param> | ||
/// <param name='cancellationToken'> | ||
/// The cancellation token. | ||
/// </param> | ||
Task<AzureOperationResponse> PostRequiredWithHttpMessagesAsync(ParameterGroupingPostRequiredParameters parameters, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); | ||
/// <summary> | ||
/// Post a bunch of optional parameters grouped | ||
/// </summary> | ||
/// <param name='parameters'> | ||
/// Additional parameters for the operation | ||
/// </param> | ||
/// <param name='customHeaders'> | ||
/// The headers that will be added to request. | ||
/// </param> | ||
/// <param name='cancellationToken'> | ||
/// The cancellation token. | ||
/// </param> | ||
Task<AzureOperationResponse> PostOptionalWithHttpMessagesAsync(ParameterGroupingPostOptionalParameters parameters = default(ParameterGroupingPostOptionalParameters), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); | ||
} | ||
} |
Oops, something went wrong.