-
Notifications
You must be signed in to change notification settings - Fork 226
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add test cases to validate the body of ctors
- Loading branch information
1 parent
8e025ce
commit 631b9aa
Showing
12 changed files
with
94 additions
and
34 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
6 changes: 6 additions & 0 deletions
6
...lientProviderTests/TestBuildConstructors_PrimaryConstructor(WithDefault,False,False,0).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,6 @@ | ||
global::Sample.Argument.AssertNotNull(endpoint, nameof(endpoint)); | ||
|
||
options ??= new global::Sample.TestClientOptions(); | ||
|
||
_endpoint = endpoint; | ||
Pipeline = global::System.ClientModel.Primitives.ClientPipeline.Create(options, Array.Empty<global::System.ClientModel.Primitives.PipelinePolicy>(), Array.Empty<global::System.ClientModel.Primitives.PipelinePolicy>(), Array.Empty<global::System.ClientModel.Primitives.PipelinePolicy>()); |
8 changes: 8 additions & 0 deletions
8
...ClientProviderTests/TestBuildConstructors_PrimaryConstructor(WithDefault,False,True,0).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,8 @@ | ||
global::Sample.Argument.AssertNotNull(endpoint, nameof(endpoint)); | ||
global::Sample.Argument.AssertNotNull(tokenCredential, nameof(tokenCredential)); | ||
|
||
options ??= new global::Sample.TestClientOptions(); | ||
|
||
_endpoint = endpoint; | ||
_tokenCredential = tokenCredential; | ||
Pipeline = global::System.ClientModel.Primitives.ClientPipeline.Create(options, Array.Empty<global::System.ClientModel.Primitives.PipelinePolicy>(), new global::System.ClientModel.Primitives.PipelinePolicy[] { this.GetFakeTokenAuthorizationPolicy(_tokenCredential, AuthorizationScopes) }, Array.Empty<global::System.ClientModel.Primitives.PipelinePolicy>()); |
8 changes: 8 additions & 0 deletions
8
...ClientProviderTests/TestBuildConstructors_PrimaryConstructor(WithDefault,True,False,0).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,8 @@ | ||
global::Sample.Argument.AssertNotNull(endpoint, nameof(endpoint)); | ||
global::Sample.Argument.AssertNotNull(keyCredential, nameof(keyCredential)); | ||
|
||
options ??= new global::Sample.TestClientOptions(); | ||
|
||
_endpoint = endpoint; | ||
_keyCredential = keyCredential; | ||
Pipeline = global::System.ClientModel.Primitives.ClientPipeline.Create(options, Array.Empty<global::System.ClientModel.Primitives.PipelinePolicy>(), new global::System.ClientModel.Primitives.PipelinePolicy[] { global::System.ClientModel.Primitives.ApiKeyAuthenticationPolicy.CreateHeaderApiKeyPolicy(_keyCredential, AuthorizationHeader) }, Array.Empty<global::System.ClientModel.Primitives.PipelinePolicy>()); |
8 changes: 8 additions & 0 deletions
8
.../ClientProviderTests/TestBuildConstructors_PrimaryConstructor(WithDefault,True,True,0).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,8 @@ | ||
global::Sample.Argument.AssertNotNull(endpoint, nameof(endpoint)); | ||
global::Sample.Argument.AssertNotNull(keyCredential, nameof(keyCredential)); | ||
|
||
options ??= new global::Sample.TestClientOptions(); | ||
|
||
_endpoint = endpoint; | ||
_keyCredential = keyCredential; | ||
Pipeline = global::System.ClientModel.Primitives.ClientPipeline.Create(options, Array.Empty<global::System.ClientModel.Primitives.PipelinePolicy>(), new global::System.ClientModel.Primitives.PipelinePolicy[] { global::System.ClientModel.Primitives.ApiKeyAuthenticationPolicy.CreateHeaderApiKeyPolicy(_keyCredential, AuthorizationHeader) }, Array.Empty<global::System.ClientModel.Primitives.PipelinePolicy>()); |
8 changes: 8 additions & 0 deletions
8
.../ClientProviderTests/TestBuildConstructors_PrimaryConstructor(WithDefault,True,True,1).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,8 @@ | ||
global::Sample.Argument.AssertNotNull(endpoint, nameof(endpoint)); | ||
global::Sample.Argument.AssertNotNull(tokenCredential, nameof(tokenCredential)); | ||
|
||
options ??= new global::Sample.TestClientOptions(); | ||
|
||
_endpoint = endpoint; | ||
_tokenCredential = tokenCredential; | ||
Pipeline = global::System.ClientModel.Primitives.ClientPipeline.Create(options, Array.Empty<global::System.ClientModel.Primitives.PipelinePolicy>(), new global::System.ClientModel.Primitives.PipelinePolicy[] { this.GetFakeTokenAuthorizationPolicy(_tokenCredential, AuthorizationScopes) }, Array.Empty<global::System.ClientModel.Primitives.PipelinePolicy>()); |
6 changes: 6 additions & 0 deletions
6
...ientProviderTests/TestBuildConstructors_PrimaryConstructor(WithRequired,False,False,0).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,6 @@ | ||
global::Sample.Argument.AssertNotNull(endpoint, nameof(endpoint)); | ||
|
||
options ??= new global::Sample.TestClientOptions(); | ||
|
||
_endpoint = endpoint; | ||
Pipeline = global::System.ClientModel.Primitives.ClientPipeline.Create(options, Array.Empty<global::System.ClientModel.Primitives.PipelinePolicy>(), Array.Empty<global::System.ClientModel.Primitives.PipelinePolicy>(), Array.Empty<global::System.ClientModel.Primitives.PipelinePolicy>()); |
8 changes: 8 additions & 0 deletions
8
...lientProviderTests/TestBuildConstructors_PrimaryConstructor(WithRequired,False,True,0).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,8 @@ | ||
global::Sample.Argument.AssertNotNull(endpoint, nameof(endpoint)); | ||
global::Sample.Argument.AssertNotNull(tokenCredential, nameof(tokenCredential)); | ||
|
||
options ??= new global::Sample.TestClientOptions(); | ||
|
||
_endpoint = endpoint; | ||
_tokenCredential = tokenCredential; | ||
Pipeline = global::System.ClientModel.Primitives.ClientPipeline.Create(options, Array.Empty<global::System.ClientModel.Primitives.PipelinePolicy>(), new global::System.ClientModel.Primitives.PipelinePolicy[] { this.GetFakeTokenAuthorizationPolicy(_tokenCredential, AuthorizationScopes) }, Array.Empty<global::System.ClientModel.Primitives.PipelinePolicy>()); |
8 changes: 8 additions & 0 deletions
8
...lientProviderTests/TestBuildConstructors_PrimaryConstructor(WithRequired,True,False,0).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,8 @@ | ||
global::Sample.Argument.AssertNotNull(endpoint, nameof(endpoint)); | ||
global::Sample.Argument.AssertNotNull(keyCredential, nameof(keyCredential)); | ||
|
||
options ??= new global::Sample.TestClientOptions(); | ||
|
||
_endpoint = endpoint; | ||
_keyCredential = keyCredential; | ||
Pipeline = global::System.ClientModel.Primitives.ClientPipeline.Create(options, Array.Empty<global::System.ClientModel.Primitives.PipelinePolicy>(), new global::System.ClientModel.Primitives.PipelinePolicy[] { global::System.ClientModel.Primitives.ApiKeyAuthenticationPolicy.CreateHeaderApiKeyPolicy(_keyCredential, AuthorizationHeader) }, Array.Empty<global::System.ClientModel.Primitives.PipelinePolicy>()); |
8 changes: 8 additions & 0 deletions
8
...ClientProviderTests/TestBuildConstructors_PrimaryConstructor(WithRequired,True,True,0).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,8 @@ | ||
global::Sample.Argument.AssertNotNull(endpoint, nameof(endpoint)); | ||
global::Sample.Argument.AssertNotNull(keyCredential, nameof(keyCredential)); | ||
|
||
options ??= new global::Sample.TestClientOptions(); | ||
|
||
_endpoint = endpoint; | ||
_keyCredential = keyCredential; | ||
Pipeline = global::System.ClientModel.Primitives.ClientPipeline.Create(options, Array.Empty<global::System.ClientModel.Primitives.PipelinePolicy>(), new global::System.ClientModel.Primitives.PipelinePolicy[] { global::System.ClientModel.Primitives.ApiKeyAuthenticationPolicy.CreateHeaderApiKeyPolicy(_keyCredential, AuthorizationHeader) }, Array.Empty<global::System.ClientModel.Primitives.PipelinePolicy>()); |
8 changes: 8 additions & 0 deletions
8
...ClientProviderTests/TestBuildConstructors_PrimaryConstructor(WithRequired,True,True,1).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,8 @@ | ||
global::Sample.Argument.AssertNotNull(endpoint, nameof(endpoint)); | ||
global::Sample.Argument.AssertNotNull(tokenCredential, nameof(tokenCredential)); | ||
|
||
options ??= new global::Sample.TestClientOptions(); | ||
|
||
_endpoint = endpoint; | ||
_tokenCredential = tokenCredential; | ||
Pipeline = global::System.ClientModel.Primitives.ClientPipeline.Create(options, Array.Empty<global::System.ClientModel.Primitives.PipelinePolicy>(), new global::System.ClientModel.Primitives.PipelinePolicy[] { this.GetFakeTokenAuthorizationPolicy(_tokenCredential, AuthorizationScopes) }, Array.Empty<global::System.ClientModel.Primitives.PipelinePolicy>()); |
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