This repository was archived by the owner on Jun 16, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 175
resolves SCM changes ClientUriBuilder
#4519
Merged
ArcturusZhang
merged 19 commits into
Azure:feature/v3
from
ArcturusZhang:update-clienturibuilder
Apr 22, 2024
Merged
Changes from 11 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
cf06fdc
update clienturibuilder
ArcturusZhang 52e0d53
Merge branch 'feature/v3' into update-clienturibuilder
ArcturusZhang 8bb591c
Merge branch 'feature/v3' into update-clienturibuilder
ArcturusZhang e5e175f
regen
ArcturusZhang e1c9633
Merge branch 'feature/v3' into update-clienturibuilder
ArcturusZhang 934eba4
Merge branch 'feature/v3' into update-clienturibuilder
ArcturusZhang cba5308
update regen
ArcturusZhang 5495de2
Merge remote-tracking branch 'origin/feature/v3' into update-clientur…
ArcturusZhang f98535b
fix the test issue
ArcturusZhang 1521065
add test cases to validate clienturibuilder could handle various case…
ArcturusZhang d7abcf9
Merge branch 'feature/v3' into update-clienturibuilder
ArcturusZhang 9c17b90
Merge branch 'feature/v3' into update-clienturibuilder
ArcturusZhang 62d4155
resolve comments
ArcturusZhang 15a2649
update code
ArcturusZhang b46506d
add test cases
ArcturusZhang db166c9
Merge branch 'feature/v3' into update-clienturibuilder
ArcturusZhang eb24451
Merge branch 'feature/v3' into update-clienturibuilder
ArcturusZhang 387ff40
Merge branch 'feature/v3' into update-clienturibuilder
ArcturusZhang 2134664
Merge branch 'feature/v3' into update-clienturibuilder
ArcturusZhang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
1 change: 0 additions & 1 deletion
1
src/AutoRest.CSharp/Common/Output/Expressions/ValueExpressions/IndexerExpression.cs
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,66 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. | ||
|
|
||
| using System; | ||
| using NUnit.Framework; | ||
| using UnbrandedTypeSpec; | ||
|
|
||
| namespace UnbrandedProjects.Tests | ||
| { | ||
| public class ClientUriBuilderTests | ||
| { | ||
| [TestCaseSource(nameof(AppendPathSource))] | ||
| public void ValidateAppendPath_ToUri(Uri expected, Uri endpoint, params string[] paths) | ||
| { | ||
| var uriBuilder = new ClientUriBuilder(); | ||
| uriBuilder.Reset(endpoint); | ||
| foreach (var path in paths) | ||
| { | ||
| uriBuilder.AppendPath(path, false); | ||
| } | ||
|
|
||
| var uri = uriBuilder.ToUri(); | ||
| Assert.AreEqual(expected, uri); | ||
| } | ||
|
|
||
| private static readonly object[] AppendPathSource = | ||
| { | ||
| new object[] | ||
| { | ||
| new Uri("https://api.openai.com/v1"), new Uri("https://api.openai.com/v1"), Array.Empty<string>() | ||
| }, | ||
| new object[] | ||
| { | ||
| new Uri("https://api.openai.com/v1/"), new Uri("https://api.openai.com/v1/"), Array.Empty<string>() | ||
| }, | ||
| new object[] | ||
| { | ||
| new Uri("https://api.openai.com/v1/doSomething"), new Uri("https://api.openai.com/v1"), new[] { "/doSomething" } | ||
| }, | ||
| new object[] | ||
| { | ||
| new Uri("https://api.openai.com/v1/doSomething"), new Uri("https://api.openai.com/v1/"), new[] { "/doSomething" } | ||
| }, | ||
| new object[] | ||
| { | ||
| new Uri("https://api.openai.com/v1/doSomething/"), new Uri("https://api.openai.com/v1"), new[] { "/doSomething/" } | ||
| }, | ||
| new object[] | ||
| { | ||
| new Uri("https://api.openai.com/v1/doSomething/"), new Uri("https://api.openai.com/v1/"), new[] { "/doSomething/" } | ||
| }, | ||
| new object[] | ||
| { | ||
| new Uri("https://api.openai.com/v1/doSomething/else"), new Uri("https://api.openai.com/v1"), new[] { "/doSomething", "/else" } | ||
| }, | ||
| new object[] | ||
| { | ||
| new Uri("https://api.openai.com/v1/doSomething/else"), new Uri("https://api.openai.com/v1/"), new[] { "/doSomething", "/else" } | ||
| }, | ||
| new object[] | ||
| { | ||
| new Uri("https://api.openai.com/v1/doSomething/else/"), new Uri("https://api.openai.com/v1/"), new[] { "/doSomething/", "/else/" } | ||
| } | ||
| }; | ||
| } | ||
| } | ||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.