-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix a typo * support projected name * update shared code * remove an unused function * the generation is incorrect * fixed issue * add cadl ranch test cases * regenerate * move the constants to a standalone file * fix prettier --------- Co-authored-by: Mingzhe Huang <[email protected]>
- Loading branch information
1 parent
44a88c1
commit aa049aa
Showing
17 changed files
with
1,350 additions
and
106 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. See License.txt in the project root for license information. | ||
|
||
export const projectedNameJsonKey = "json"; | ||
export const projectedNameCSharpKey = "csharp"; | ||
export const projectedNameClientKey = "client"; |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
using System.Threading.Tasks; | ||
using AutoRest.TestServer.Tests.Infrastructure; | ||
using Azure; | ||
using NUnit.Framework; | ||
using ProjectedName; | ||
using ProjectedName.Models; | ||
|
||
namespace CadlRanchProjects.Tests | ||
{ | ||
public class ProjectionTests : CadlRanchTestBase | ||
{ | ||
[Test] | ||
public Task ProjectedName_jsonProjection() => Test(async (host) => | ||
{ | ||
Project project = new Project() | ||
{ | ||
ProducedBy = "DPG", | ||
}; | ||
Response response = await new ProjectedNameClient(host, null).JsonProjectionAsync(project); | ||
Assert.AreEqual(204, response.Status); | ||
}); | ||
|
||
[Test] | ||
public Task ProjectedName_clientProjection() => Test(async (host) => | ||
{ | ||
Project project = new Project() | ||
{ | ||
CreatedBy = "DPG", | ||
}; | ||
Response response = await new ProjectedNameClient(host, null).ClientProjectionAsync(project); | ||
Assert.AreEqual(204, response.Status); | ||
}); | ||
|
||
[Test] | ||
public Task ProjectedName_languageProjection() => Test(async (host) => | ||
{ | ||
Project project = new Project() | ||
{ | ||
MadeForCS = "customers" | ||
}; | ||
Response response = await new ProjectedNameClient(host, null).LanguageProjectionAsync(project); | ||
Assert.AreEqual(204, response.Status); | ||
}); | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
test/CadlRanchProjects/projection/Generated/Configuration.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.