-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: Added resource name proto test for loose resource pattern vali…
…dation
- Loading branch information
Showing
13 changed files
with
984 additions
and
6 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
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
41 changes: 41 additions & 0 deletions
41
...Names.GeneratedSnippets/ResourceNamesClient.LooseValidationPatternMethodAsyncSnippet.g.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,41 @@ | ||
// Copyright 2019 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
// Generated code. DO NOT EDIT! | ||
|
||
namespace Testing.ResourceNames.Snippets | ||
{ | ||
// [START unknown_generated_ResourceNames_LooseValidationPatternMethod_async_flattened] | ||
using System.Threading.Tasks; | ||
using Testing.ResourceNames; | ||
|
||
public sealed partial class GeneratedResourceNamesClientSnippets | ||
{ | ||
/// <summary>Snippet for LooseValidationPatternMethodAsync</summary> | ||
/// <remarks> | ||
/// This snippet has been automatically generated for illustrative purposes only. | ||
/// It may require modifications to work in your environment. | ||
/// </remarks> | ||
public async Task LooseValidationPatternMethodAsync() | ||
{ | ||
// Create client | ||
ResourceNamesClient resourceNamesClient = await ResourceNamesClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
string name = "parents/[PARENT_ID]/invalid_name/items/[ITEM_ID]"; | ||
// Make the request | ||
Response response = await resourceNamesClient.LooseValidationPatternMethodAsync(name); | ||
} | ||
} | ||
// [END unknown_generated_ResourceNames_LooseValidationPatternMethod_async_flattened] | ||
} |
44 changes: 44 additions & 0 deletions
44
...edSnippets/ResourceNamesClient.LooseValidationPatternMethodRequestObjectAsyncSnippet.g.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,44 @@ | ||
// Copyright 2019 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
// Generated code. DO NOT EDIT! | ||
|
||
namespace Testing.ResourceNames.Snippets | ||
{ | ||
// [START unknown_generated_ResourceNames_LooseValidationPatternMethod_async] | ||
using System.Threading.Tasks; | ||
using Testing.ResourceNames; | ||
|
||
public sealed partial class GeneratedResourceNamesClientSnippets | ||
{ | ||
/// <summary>Snippet for LooseValidationPatternMethodAsync</summary> | ||
/// <remarks> | ||
/// This snippet has been automatically generated for illustrative purposes only. | ||
/// It may require modifications to work in your environment. | ||
/// </remarks> | ||
public async Task LooseValidationPatternMethodRequestObjectAsync() | ||
{ | ||
// Create client | ||
ResourceNamesClient resourceNamesClient = await ResourceNamesClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
LooseValidationPattern request = new LooseValidationPattern | ||
{ | ||
LooseValidationPatternName = LooseValidationPatternName.FromParentItem("[PARENT_ID]", "[ITEM_ID]"), | ||
}; | ||
// Make the request | ||
Response response = await resourceNamesClient.LooseValidationPatternMethodAsync(request); | ||
} | ||
} | ||
// [END unknown_generated_ResourceNames_LooseValidationPatternMethod_async] | ||
} |
43 changes: 43 additions & 0 deletions
43
...neratedSnippets/ResourceNamesClient.LooseValidationPatternMethodRequestObjectSnippet.g.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,43 @@ | ||
// Copyright 2019 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
// Generated code. DO NOT EDIT! | ||
|
||
namespace Testing.ResourceNames.Snippets | ||
{ | ||
// [START unknown_generated_ResourceNames_LooseValidationPatternMethod_sync] | ||
using Testing.ResourceNames; | ||
|
||
public sealed partial class GeneratedResourceNamesClientSnippets | ||
{ | ||
/// <summary>Snippet for LooseValidationPatternMethod</summary> | ||
/// <remarks> | ||
/// This snippet has been automatically generated for illustrative purposes only. | ||
/// It may require modifications to work in your environment. | ||
/// </remarks> | ||
public void LooseValidationPatternMethodRequestObject() | ||
{ | ||
// Create client | ||
ResourceNamesClient resourceNamesClient = ResourceNamesClient.Create(); | ||
// Initialize request argument(s) | ||
LooseValidationPattern request = new LooseValidationPattern | ||
{ | ||
LooseValidationPatternName = LooseValidationPatternName.FromParentItem("[PARENT_ID]", "[ITEM_ID]"), | ||
}; | ||
// Make the request | ||
Response response = resourceNamesClient.LooseValidationPatternMethod(request); | ||
} | ||
} | ||
// [END unknown_generated_ResourceNames_LooseValidationPatternMethod_sync] | ||
} |
41 changes: 41 additions & 0 deletions
41
...edSnippets/ResourceNamesClient.LooseValidationPatternMethodResourceNamesAsyncSnippet.g.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,41 @@ | ||
// Copyright 2019 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
// Generated code. DO NOT EDIT! | ||
|
||
namespace Testing.ResourceNames.Snippets | ||
{ | ||
// [START unknown_generated_ResourceNames_LooseValidationPatternMethod_async_flattened_resourceNames] | ||
using System.Threading.Tasks; | ||
using Testing.ResourceNames; | ||
|
||
public sealed partial class GeneratedResourceNamesClientSnippets | ||
{ | ||
/// <summary>Snippet for LooseValidationPatternMethodAsync</summary> | ||
/// <remarks> | ||
/// This snippet has been automatically generated for illustrative purposes only. | ||
/// It may require modifications to work in your environment. | ||
/// </remarks> | ||
public async Task LooseValidationPatternMethodResourceNamesAsync() | ||
{ | ||
// Create client | ||
ResourceNamesClient resourceNamesClient = await ResourceNamesClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
LooseValidationPatternName name = LooseValidationPatternName.FromParentItem("[PARENT_ID]", "[ITEM_ID]"); | ||
// Make the request | ||
Response response = await resourceNamesClient.LooseValidationPatternMethodAsync(name); | ||
} | ||
} | ||
// [END unknown_generated_ResourceNames_LooseValidationPatternMethod_async_flattened_resourceNames] | ||
} |
40 changes: 40 additions & 0 deletions
40
...neratedSnippets/ResourceNamesClient.LooseValidationPatternMethodResourceNamesSnippet.g.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,40 @@ | ||
// Copyright 2019 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
// Generated code. DO NOT EDIT! | ||
|
||
namespace Testing.ResourceNames.Snippets | ||
{ | ||
// [START unknown_generated_ResourceNames_LooseValidationPatternMethod_sync_flattened_resourceNames] | ||
using Testing.ResourceNames; | ||
|
||
public sealed partial class GeneratedResourceNamesClientSnippets | ||
{ | ||
/// <summary>Snippet for LooseValidationPatternMethod</summary> | ||
/// <remarks> | ||
/// This snippet has been automatically generated for illustrative purposes only. | ||
/// It may require modifications to work in your environment. | ||
/// </remarks> | ||
public void LooseValidationPatternMethodResourceNames() | ||
{ | ||
// Create client | ||
ResourceNamesClient resourceNamesClient = ResourceNamesClient.Create(); | ||
// Initialize request argument(s) | ||
LooseValidationPatternName name = LooseValidationPatternName.FromParentItem("[PARENT_ID]", "[ITEM_ID]"); | ||
// Make the request | ||
Response response = resourceNamesClient.LooseValidationPatternMethod(name); | ||
} | ||
} | ||
// [END unknown_generated_ResourceNames_LooseValidationPatternMethod_sync_flattened_resourceNames] | ||
} |
40 changes: 40 additions & 0 deletions
40
...ourceNames.GeneratedSnippets/ResourceNamesClient.LooseValidationPatternMethodSnippet.g.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,40 @@ | ||
// Copyright 2019 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
// Generated code. DO NOT EDIT! | ||
|
||
namespace Testing.ResourceNames.Snippets | ||
{ | ||
// [START unknown_generated_ResourceNames_LooseValidationPatternMethod_sync_flattened] | ||
using Testing.ResourceNames; | ||
|
||
public sealed partial class GeneratedResourceNamesClientSnippets | ||
{ | ||
/// <summary>Snippet for LooseValidationPatternMethod</summary> | ||
/// <remarks> | ||
/// This snippet has been automatically generated for illustrative purposes only. | ||
/// It may require modifications to work in your environment. | ||
/// </remarks> | ||
public void LooseValidationPatternMethod() | ||
{ | ||
// Create client | ||
ResourceNamesClient resourceNamesClient = ResourceNamesClient.Create(); | ||
// Initialize request argument(s) | ||
string name = "parents/[PARENT_ID]/invalid_name/items/[ITEM_ID]"; | ||
// Make the request | ||
Response response = resourceNamesClient.LooseValidationPatternMethod(name); | ||
} | ||
} | ||
// [END unknown_generated_ResourceNames_LooseValidationPatternMethod_sync_flattened] | ||
} |
Oops, something went wrong.