-
Notifications
You must be signed in to change notification settings - Fork 230
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make the test project individually for each cadl ranch project
- Loading branch information
1 parent
fd933a7
commit a544bef
Showing
34 changed files
with
526 additions
and
165 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
15 changes: 15 additions & 0 deletions
15
...estProjects/CadlRanch.Tests/Http/Authentication/ApiKey/Authentication.ApiKey.Tests.csproj
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,15 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="System.Memory.Data" /> | ||
<PackageReference Include="System.ClientModel" /> | ||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="$(RepoRoot)\Microsoft.Generator.CSharp\test\common\Microsoft.Generator.CSharp.Tests.Common.csproj" /> | ||
<ProjectReference Include="$(RepoRoot)\TestProjects\CadlRanch\http\authentication\api-key\src\Authentication.ApiKey.csproj" /> | ||
<ProjectReference Include="$(RepoRoot)\TestProjects\CadlRanch.Tests\TestProjects.CadlRanch.Tests.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
15 changes: 15 additions & 0 deletions
15
...s/CadlRanch.Tests/Http/Authentication/Http/Custom/Authentication.Http.Custom.Tests.csproj
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,15 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="System.Memory.Data" /> | ||
<PackageReference Include="System.ClientModel" /> | ||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="$(RepoRoot)\Microsoft.Generator.CSharp\test\common\Microsoft.Generator.CSharp.Tests.Common.csproj" /> | ||
<ProjectReference Include="$(RepoRoot)\TestProjects\CadlRanch\http\authentication\http\custom\src\Authentication.Http.Custom.csproj" /> | ||
<ProjectReference Include="$(RepoRoot)\TestProjects\CadlRanch.Tests\TestProjects.CadlRanch.Tests.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
15 changes: 15 additions & 0 deletions
15
...harp/generator/TestProjects/CadlRanch.Tests/Http/Client/Naming/Client.Naming.Tests.csproj
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,15 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="System.Memory.Data" /> | ||
<PackageReference Include="System.ClientModel" /> | ||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="$(RepoRoot)\Microsoft.Generator.CSharp\test\common\Microsoft.Generator.CSharp.Tests.Common.csproj" /> | ||
<!-- <ProjectReference Include="$(RepoRoot)\TestProjects\CadlRanch\http\client\naming\src\Client.Naming.csproj" /> --> | ||
<ProjectReference Include="$(RepoRoot)\TestProjects\CadlRanch.Tests\TestProjects.CadlRanch.Tests.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
186 changes: 93 additions & 93 deletions
186
...tp-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/Client/Naming/NamingTests.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 |
---|---|---|
@@ -1,110 +1,110 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
//using System.Threading.Tasks; | ||
//using Client.Naming; | ||
//using Client.Naming.Model; | ||
//using Client.Naming.Property; | ||
//using NUnit.Framework; | ||
//using ClientModel = Client.Naming.Model.ClientModel; | ||
// using System.Threading.Tasks; | ||
// using Client.Naming; | ||
// using Client.Naming.Model; | ||
// using Client.Naming.Property; | ||
// using NUnit.Framework; | ||
// using ClientModel = Client.Naming.Model.ClientModel; | ||
|
||
//namespace TestProjects.CadlRanch.Tests.Http.Client.Naming | ||
//{ | ||
// public class ClientNamingTests : CadlRanchTestBase | ||
// { | ||
// [CadlRanchTest] | ||
// public Task Client() => Test(async (host) => | ||
// { | ||
// var response = await new NamingClient(host, null).ClientAsync(new ClientNameModel(true)); | ||
// Assert.AreEqual(204, response.GetRawResponse().Status); | ||
// namespace TestProjects.CadlRanch.Tests.Http.Client.Naming | ||
// { | ||
// public class ClientNamingTests : CadlRanchTestBase | ||
// { | ||
// [CadlRanchTest] | ||
// public Task Client() => Test(async (host) => | ||
// { | ||
// var response = await new NamingClient(host, null).ClientAsync(new ClientNameModel(true)); | ||
// Assert.AreEqual(204, response.GetRawResponse().Status); | ||
|
||
// Assert.NotNull(typeof(ClientNameModel).GetProperty("ClientName")); | ||
// Assert.IsNull(typeof(ClientNameModel).GetProperty("DefaultName")); | ||
// }); | ||
// Assert.NotNull(typeof(ClientNameModel).GetProperty("ClientName")); | ||
// Assert.IsNull(typeof(ClientNameModel).GetProperty("DefaultName")); | ||
// }); | ||
|
||
// [CadlRanchTest] | ||
// public Task Language() => Test(async (host) => | ||
// { | ||
// var response = await new NamingClient(host, null).LanguageAsync(new LanguageClientNameModel(true)); | ||
// Assert.AreEqual(204, response.GetRawResponse().Status); | ||
// [CadlRanchTest] | ||
// public Task Language() => Test(async (host) => | ||
// { | ||
// var response = await new NamingClient(host, null).LanguageAsync(new LanguageClientNameModel(true)); | ||
// Assert.AreEqual(204, response.GetRawResponse().Status); | ||
|
||
// Assert.NotNull(typeof(LanguageClientNameModel).GetProperty("CSName")); | ||
// Assert.IsNull(typeof(LanguageClientNameModel).GetProperty("DefaultName")); | ||
// }); | ||
// Assert.NotNull(typeof(LanguageClientNameModel).GetProperty("CSName")); | ||
// Assert.IsNull(typeof(LanguageClientNameModel).GetProperty("DefaultName")); | ||
// }); | ||
|
||
// [CadlRanchTest] | ||
// public Task CompatibleWithEncodedName() => Test(async (host) => | ||
// { | ||
// var response = await new NamingClient(host, null).CompatibleWithEncodedNameAsync(new ClientNameAndJsonEncodedNameModel(true)); | ||
// Assert.AreEqual(204, response.GetRawResponse().Status); | ||
// [CadlRanchTest] | ||
// public Task CompatibleWithEncodedName() => Test(async (host) => | ||
// { | ||
// var response = await new NamingClient(host, null).CompatibleWithEncodedNameAsync(new ClientNameAndJsonEncodedNameModel(true)); | ||
// Assert.AreEqual(204, response.GetRawResponse().Status); | ||
|
||
// Assert.NotNull(typeof(ClientNameModel).GetProperty("ClientName")); | ||
// Assert.IsNull(typeof(ClientNameModel).GetProperty("DefaultName")); | ||
// }); | ||
// Assert.NotNull(typeof(ClientNameModel).GetProperty("ClientName")); | ||
// Assert.IsNull(typeof(ClientNameModel).GetProperty("DefaultName")); | ||
// }); | ||
|
||
// [CadlRanchTest] | ||
// public Task Operation() => Test(async (host) => | ||
// { | ||
// var response = await new NamingClient(host, null).ClientNameAsync(); | ||
// Assert.AreEqual(204, response.GetRawResponse().Status); | ||
// }); | ||
// [CadlRanchTest] | ||
// public Task Operation() => Test(async (host) => | ||
// { | ||
// var response = await new NamingClient(host, null).ClientNameAsync(); | ||
// Assert.AreEqual(204, response.GetRawResponse().Status); | ||
// }); | ||
|
||
// [CadlRanchTest] | ||
// public Task Parameter() => Test(async (host) => | ||
// { | ||
// var response = await new NamingClient(host, null).ParameterAsync(clientName: "true"); | ||
// Assert.AreEqual(204, response.GetRawResponse().Status); | ||
// }); | ||
// [CadlRanchTest] | ||
// public Task Parameter() => Test(async (host) => | ||
// { | ||
// var response = await new NamingClient(host, null).ParameterAsync(clientName: "true"); | ||
// Assert.AreEqual(204, response.GetRawResponse().Status); | ||
// }); | ||
|
||
// [CadlRanchTest] | ||
// public Task Request() => Test(async (host) => | ||
// { | ||
// var response = await new NamingClient(host, null).RequestAsync(clientName: "true"); | ||
// Assert.AreEqual(204, response.GetRawResponse().Status); | ||
// }); | ||
// [CadlRanchTest] | ||
// public Task Request() => Test(async (host) => | ||
// { | ||
// var response = await new NamingClient(host, null).RequestAsync(clientName: "true"); | ||
// Assert.AreEqual(204, response.GetRawResponse().Status); | ||
// }); | ||
|
||
// [CadlRanchTest] | ||
// public Task Response() => Test(async (host) => | ||
// { | ||
// var response = await new NamingClient(host, null).ResponseAsync(); | ||
// Assert.IsTrue(response.GetRawResponse().Headers.TryGetValue("default-name", out _)); | ||
// foreach (var header in response.GetRawResponse().Headers) | ||
// { | ||
// var key = header.Key; | ||
// if (key == "default-name") | ||
// { | ||
// var value = header.Value; | ||
// Assert.AreEqual("true", value); | ||
// } | ||
// } | ||
// }); | ||
// [CadlRanchTest] | ||
// public Task Response() => Test(async (host) => | ||
// { | ||
// var response = await new NamingClient(host, null).ResponseAsync(); | ||
// Assert.IsTrue(response.GetRawResponse().Headers.TryGetValue("default-name", out _)); | ||
// foreach (var header in response.GetRawResponse().Headers) | ||
// { | ||
// var key = header.Key; | ||
// if (key == "default-name") | ||
// { | ||
// var value = header.Value; | ||
// Assert.AreEqual("true", value); | ||
// } | ||
// } | ||
// }); | ||
|
||
// [CadlRanchTest] | ||
// public Task ModelClient() => Test(async (host) => | ||
// { | ||
// var response = await new NamingClient(host, null).GetClientModelClient().ClientAsync(new ClientModel(true)); | ||
// Assert.AreEqual(204, response.GetRawResponse().Status); | ||
// }); | ||
// [CadlRanchTest] | ||
// public Task ModelClient() => Test(async (host) => | ||
// { | ||
// var response = await new NamingClient(host, null).GetClientModelClient().ClientAsync(new ClientModel(true)); | ||
// Assert.AreEqual(204, response.GetRawResponse().Status); | ||
// }); | ||
|
||
// [CadlRanchTest] | ||
// public Task ModelLanguage() => Test(async (host) => | ||
// { | ||
// var response = await new NamingClient(host, null).GetClientModelClient().LanguageAsync(new CSModel(true)); | ||
// Assert.AreEqual(204, response.GetRawResponse().Status); | ||
// }); | ||
// [CadlRanchTest] | ||
// public Task ModelLanguage() => Test(async (host) => | ||
// { | ||
// var response = await new NamingClient(host, null).GetClientModelClient().LanguageAsync(new CSModel(true)); | ||
// Assert.AreEqual(204, response.GetRawResponse().Status); | ||
// }); | ||
|
||
// [CadlRanchTest] | ||
// public Task UnionEnumName() => Test(async (host) => | ||
// { | ||
// var response = await new NamingClient(host, null).GetUnionEnumClient().UnionEnumNameAsync(ClientExtensibleEnum.EnumValue1); | ||
// Assert.AreEqual(204, response.GetRawResponse().Status); | ||
// }); | ||
// [CadlRanchTest] | ||
// public Task UnionEnumName() => Test(async (host) => | ||
// { | ||
// var response = await new NamingClient(host, null).GetUnionEnumClient().UnionEnumNameAsync(ClientExtensibleEnum.EnumValue1); | ||
// Assert.AreEqual(204, response.GetRawResponse().Status); | ||
// }); | ||
|
||
// [CadlRanchTest] | ||
// public Task UnionEnumMemberName() => Test(async (host) => | ||
// { | ||
// var response = await new NamingClient(host, null).GetUnionEnumClient().UnionEnumMemberNameAsync(ExtensibleEnum.ClientEnumValue1); | ||
// Assert.AreEqual(204, response.GetRawResponse().Status); | ||
// }); | ||
// } | ||
//} | ||
// [CadlRanchTest] | ||
// public Task UnionEnumMemberName() => Test(async (host) => | ||
// { | ||
// var response = await new NamingClient(host, null).GetUnionEnumClient().UnionEnumMemberNameAsync(ExtensibleEnum.ClientEnumValue1); | ||
// Assert.AreEqual(204, response.GetRawResponse().Status); | ||
// }); | ||
// } | ||
// } |
15 changes: 15 additions & 0 deletions
15
.../Client/Structure/ClientOperationGroup/Client.Structure.ClientOperationGroup.Tests.csproj
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,15 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="System.Memory.Data" /> | ||
<PackageReference Include="System.ClientModel" /> | ||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="$(RepoRoot)\Microsoft.Generator.CSharp\test\common\Microsoft.Generator.CSharp.Tests.Common.csproj" /> | ||
<ProjectReference Include="$(RepoRoot)\TestProjects\CadlRanch\http\client\structure\client-operation-group\src\Client.Structure.Service.csproj" /> | ||
<ProjectReference Include="$(RepoRoot)\TestProjects\CadlRanch.Tests\TestProjects.CadlRanch.Tests.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
6 changes: 4 additions & 2 deletions
6
...s/CadlRanch.Tests/Http/Client/Structure/ClientOperationGroup/ClientOperationGroupTests.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
15 changes: 15 additions & 0 deletions
15
...jects/CadlRanch.Tests/Http/Client/Structure/Default/Client.Structure.Default.Tests.csproj
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,15 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="System.Memory.Data" /> | ||
<PackageReference Include="System.ClientModel" /> | ||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="$(RepoRoot)\Microsoft.Generator.CSharp\test\common\Microsoft.Generator.CSharp.Tests.Common.csproj" /> | ||
<ProjectReference Include="$(RepoRoot)\TestProjects\CadlRanch\http\client\structure\default\src\Client.Structure.Service.Default.csproj" /> | ||
<ProjectReference Include="$(RepoRoot)\TestProjects\CadlRanch.Tests\TestProjects.CadlRanch.Tests.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
15 changes: 15 additions & 0 deletions
15
...dlRanch.Tests/Http/Client/Structure/MultiClient/Client.Structure.MultiClient.Tests.csproj
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,15 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="System.Memory.Data" /> | ||
<PackageReference Include="System.ClientModel" /> | ||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="$(RepoRoot)\Microsoft.Generator.CSharp\test\common\Microsoft.Generator.CSharp.Tests.Common.csproj" /> | ||
<ProjectReference Include="$(RepoRoot)\TestProjects\CadlRanch\http\client\structure\multi-client\src\Client.Structure.Service.MultiClient.csproj" /> | ||
<ProjectReference Include="$(RepoRoot)\TestProjects\CadlRanch.Tests\TestProjects.CadlRanch.Tests.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
15 changes: 15 additions & 0 deletions
15
...sts/Http/Client/Structure/RenamedOperation/Client.Structure.RenamedOperation.Tests.csproj
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,15 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="System.Memory.Data" /> | ||
<PackageReference Include="System.ClientModel" /> | ||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="$(RepoRoot)\Microsoft.Generator.CSharp\test\common\Microsoft.Generator.CSharp.Tests.Common.csproj" /> | ||
<ProjectReference Include="$(RepoRoot)\TestProjects\CadlRanch\http\client\structure\renamed-operation\src\Client.Structure.Service.RenamedOperation.csproj" /> | ||
<ProjectReference Include="$(RepoRoot)\TestProjects\CadlRanch.Tests\TestProjects.CadlRanch.Tests.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
15 changes: 15 additions & 0 deletions
15
...s/Http/Client/Structure/TwoOperationGroup/Client.Structure.TwoOperationGroup.Tests.csproj
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,15 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="System.Memory.Data" /> | ||
<PackageReference Include="System.ClientModel" /> | ||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="$(RepoRoot)\Microsoft.Generator.CSharp\test\common\Microsoft.Generator.CSharp.Tests.Common.csproj" /> | ||
<ProjectReference Include="$(RepoRoot)\TestProjects\CadlRanch\http\client\structure\two-operation-group\src\Client.Structure.Service.TwoOperationGroup.csproj" /> | ||
<ProjectReference Include="$(RepoRoot)\TestProjects\CadlRanch.Tests\TestProjects.CadlRanch.Tests.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
Oops, something went wrong.