diff --git a/packages/http-client-csharp/eng/scripts/Generate.ps1 b/packages/http-client-csharp/eng/scripts/Generate.ps1 index 14d65da8dcf..8a1a976cd05 100644 --- a/packages/http-client-csharp/eng/scripts/Generate.ps1 +++ b/packages/http-client-csharp/eng/scripts/Generate.ps1 @@ -54,10 +54,10 @@ $failingSpecs = @( Join-Path 'http' 'payload' 'xml' Join-Path 'http' 'type' 'model' 'flatten' Join-Path 'http' 'type' 'model' 'templated' + Join-Path 'http' 'client' 'naming' ) $azureAllowSpecs = @( - Join-Path 'http' 'client' 'naming' Join-Path 'http' 'client' 'structure' 'client-operation-group' Join-Path 'http' 'client' 'structure' 'default' Join-Path 'http' 'client' 'structure' 'multi-client' diff --git a/packages/http-client-csharp/eng/scripts/Get-CadlRanch-Coverage.ps1 b/packages/http-client-csharp/eng/scripts/Get-CadlRanch-Coverage.ps1 index eb27b7965d8..430745b226d 100644 --- a/packages/http-client-csharp/eng/scripts/Get-CadlRanch-Coverage.ps1 +++ b/packages/http-client-csharp/eng/scripts/Get-CadlRanch-Coverage.ps1 @@ -11,7 +11,9 @@ $specsDirectory = Join-Path $packageRoot 'node_modules' '@typespec' 'http-specs' $azureSpecsDirectory = Join-Path $packageRoot 'node_modules' '@azure-tools' 'azure-http-specs' 'specs' $cadlRanchRoot = Join-Path $packageRoot 'generator' 'TestProjects' 'CadlRanch' 'http' $directories = Get-ChildItem -Path "$cadlRanchRoot" -Directory -Recurse -$cadlRanchCsproj = Join-Path $packageRoot 'generator' 'TestProjects' 'CadlRanch.Tests' 'TestProjects.CadlRanch.Tests.csproj' +$cadlRanchTestDir = Join-Path $packageRoot 'generator' 'TestProjects' 'CadlRanch.Tests' +# Get all .csproj files recursively +$csprojFiles = Get-ChildItem -Path $cadlRanchTestDir -Recurse -Filter *.csproj $coverageDir = Join-Path $packageRoot 'generator' 'artifacts' 'coverage' @@ -67,8 +69,17 @@ foreach ($directory in $directories) { # test all Write-Host "Generating CadlRanch coverage" -ForegroundColor Cyan -$command = "dotnet test $cadlRanchCsproj" -Invoke $command + +foreach ($csprojFile in $csprojFiles) { + Write-Host "Testing $csprojFile" -ForegroundColor Cyan + $command = "dotnet test $csprojFile" + Invoke $command + # exit if the testing failed + if ($LASTEXITCODE -ne 0) { + exit $LASTEXITCODE + } +} + # exit if the testing failed if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE diff --git a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/src/Configuration.cs b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/src/Configuration.cs index f08bddbec05..f7093673ac6 100644 --- a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/src/Configuration.cs +++ b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/src/Configuration.cs @@ -18,6 +18,7 @@ public class Configuration "Type", "Array", "Enum", + "ClientModel", // segment of `System.ClientModel` ]; internal enum UnreferencedTypesHandlingOption diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/Authentication/ApiKey/Authentication.ApiKey.Tests.csproj b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/Authentication/ApiKey/Authentication.ApiKey.Tests.csproj new file mode 100644 index 00000000000..cb87d30f591 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/Authentication/ApiKey/Authentication.ApiKey.Tests.csproj @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/Authentication/Http/Custom/Authentication.Http.Custom.Tests.csproj b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/Authentication/Http/Custom/Authentication.Http.Custom.Tests.csproj new file mode 100644 index 00000000000..f8c70c6ef52 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/Authentication/Http/Custom/Authentication.Http.Custom.Tests.csproj @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/Client/Naming/Client.Naming.Tests.csproj b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/Client/Naming/Client.Naming.Tests.csproj new file mode 100644 index 00000000000..d17062b2523 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/Client/Naming/Client.Naming.Tests.csproj @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/Client/Naming/NamingTests.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/Client/Naming/NamingTests.cs index a86ed18384a..561d071e9cf 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/Client/Naming/NamingTests.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/Client/Naming/NamingTests.cs @@ -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); +// }); +// } +// } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/Client/Structure/ClientOperationGroup/Client.Structure.ClientOperationGroup.Tests.csproj b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/Client/Structure/ClientOperationGroup/Client.Structure.ClientOperationGroup.Tests.csproj new file mode 100644 index 00000000000..c55f319d88d --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/Client/Structure/ClientOperationGroup/Client.Structure.ClientOperationGroup.Tests.csproj @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/Client/Structure/ClientOperationGroup/ClientOperationGroupTests.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/Client/Structure/ClientOperationGroup/ClientOperationGroupTests.cs index f5b11b542bd..2b93a176593 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/Client/Structure/ClientOperationGroup/ClientOperationGroupTests.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/Client/Structure/ClientOperationGroup/ClientOperationGroupTests.cs @@ -1,10 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using Client.Structure.Service; -using NUnit.Framework; using System.Linq; using System.Threading.Tasks; +using Client.Structure.AnotherClientOperationGroup; +using Client.Structure.ClientOperationGroup; +using Client.Structure.Service; +using NUnit.Framework; namespace TestProjects.CadlRanch.Tests.Http.Client.Structure.ClientOperationGroup { diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/Client/Structure/Default/Client.Structure.Default.Tests.csproj b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/Client/Structure/Default/Client.Structure.Default.Tests.csproj new file mode 100644 index 00000000000..8163e3fe540 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/Client/Structure/Default/Client.Structure.Default.Tests.csproj @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/Client/Structure/MultiClient/Client.Structure.MultiClient.Tests.csproj b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/Client/Structure/MultiClient/Client.Structure.MultiClient.Tests.csproj new file mode 100644 index 00000000000..0c788100b3a --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/Client/Structure/MultiClient/Client.Structure.MultiClient.Tests.csproj @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/Client/Structure/RenamedOperation/Client.Structure.RenamedOperation.Tests.csproj b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/Client/Structure/RenamedOperation/Client.Structure.RenamedOperation.Tests.csproj new file mode 100644 index 00000000000..ff04a3404a7 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/Client/Structure/RenamedOperation/Client.Structure.RenamedOperation.Tests.csproj @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/Client/Structure/TwoOperationGroup/Client.Structure.TwoOperationGroup.Tests.csproj b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/Client/Structure/TwoOperationGroup/Client.Structure.TwoOperationGroup.Tests.csproj new file mode 100644 index 00000000000..b2616383992 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/Client/Structure/TwoOperationGroup/Client.Structure.TwoOperationGroup.Tests.csproj @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Dictionary/_Type.Dictionary.Tests.csproj b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Dictionary/_Type.Dictionary.Tests.csproj new file mode 100644 index 00000000000..3f0ace7562a --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Dictionary/_Type.Dictionary.Tests.csproj @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Model/Empty/_Type.Model.Empty.Tests.csproj b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Model/Empty/_Type.Model.Empty.Tests.csproj new file mode 100644 index 00000000000..3eb432d2193 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Model/Empty/_Type.Model.Empty.Tests.csproj @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Model/Inheritance/EnumDiscriminator/EnumDiscriminatorTest.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Model/Inheritance/EnumDiscriminator/EnumDiscriminatorTest.cs index c4506b66ce2..bf1fcc8f169 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Model/Inheritance/EnumDiscriminator/EnumDiscriminatorTest.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Model/Inheritance/EnumDiscriminator/EnumDiscriminatorTest.cs @@ -2,6 +2,7 @@ // Licensed under the MIT License. using System; +using System.Reflection; using System.Threading.Tasks; using _Type.Model.Inheritance.EnumDiscriminator; using _Type.Model.Inheritance.EnumDiscriminator.Models; @@ -41,7 +42,9 @@ public Task GetExtensibleModelWrongDiscriminator() => Test(async (host) => { var result = await new EnumDiscriminatorClient(host, null).GetExtensibleModelWrongDiscriminatorAsync(); Assert.AreEqual(200, result.GetRawResponse().Status); - Assert.IsInstanceOf(result.Value); + + var unknownDogType = Assembly.GetExecutingAssembly().GetType("_Type.Model.Inheritance.EnumDiscriminator.UnknownDog"); + Assert.AreEqual(unknownDogType, result.Value.GetType()); Assert.AreEqual(8, result.Value.Weight); }); @@ -66,7 +69,9 @@ public Task GetFixedModelMissingDiscriminator() => Test(async (host) => { var response = await new EnumDiscriminatorClient(host, null).GetFixedModelMissingDiscriminatorAsync(); Assert.AreEqual(200, response.GetRawResponse().Status); - Assert.IsInstanceOf(response.Value); + + var unknownSnakeType = Assembly.GetExecutingAssembly().GetType("_Type.Model.Inheritance.EnumDiscriminator.UnknownSnake"); + Assert.AreEqual(unknownSnakeType, response.Value.GetType()); Assert.AreEqual(10, response.Value.Length); }); diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Model/Inheritance/EnumDiscriminator/_Type.Model.Inheritance.EnumDiscriminator.Tests.csproj b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Model/Inheritance/EnumDiscriminator/_Type.Model.Inheritance.EnumDiscriminator.Tests.csproj new file mode 100644 index 00000000000..bf260d09ab3 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Model/Inheritance/EnumDiscriminator/_Type.Model.Inheritance.EnumDiscriminator.Tests.csproj @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Model/Inheritance/NestedDiscriminator/_Type.Model.Inheritance.NestedDiscriminator.Tests.csproj b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Model/Inheritance/NestedDiscriminator/_Type.Model.Inheritance.NestedDiscriminator.Tests.csproj new file mode 100644 index 00000000000..bfac921d2bc --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Model/Inheritance/NestedDiscriminator/_Type.Model.Inheritance.NestedDiscriminator.Tests.csproj @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Model/Inheritance/NotDiscriminated/_Type.Model.Inheritance.NotDiscriminator.Tests.csproj b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Model/Inheritance/NotDiscriminated/_Type.Model.Inheritance.NotDiscriminator.Tests.csproj new file mode 100644 index 00000000000..b5e8d2ae75a --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Model/Inheritance/NotDiscriminated/_Type.Model.Inheritance.NotDiscriminator.Tests.csproj @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Model/Inheritance/Recursive/_Type.Model.Inheritance.Recursive.Tests.csproj b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Model/Inheritance/Recursive/_Type.Model.Inheritance.Recursive.Tests.csproj new file mode 100644 index 00000000000..a01c5c0460a --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Model/Inheritance/Recursive/_Type.Model.Inheritance.Recursive.Tests.csproj @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Model/Inheritance/SingleDiscriminator/_Type.Model.Inheritance.SingleDiscriminator.Tests.csproj b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Model/Inheritance/SingleDiscriminator/_Type.Model.Inheritance.SingleDiscriminator.Tests.csproj new file mode 100644 index 00000000000..608f7f2c1d5 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Model/Inheritance/SingleDiscriminator/_Type.Model.Inheritance.SingleDiscriminator.Tests.csproj @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + Always + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Model/Usage/_Type.Model.Usage.Tests.csproj b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Model/Usage/_Type.Model.Usage.Tests.csproj new file mode 100644 index 00000000000..15b429b2ec4 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Model/Usage/_Type.Model.Usage.Tests.csproj @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Model/Visibility/_Type.Model.Visibility.Tests.csproj b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Model/Visibility/_Type.Model.Visibility.Tests.csproj new file mode 100644 index 00000000000..fd5ead2d4c0 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Model/Visibility/_Type.Model.Visibility.Tests.csproj @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Property/AdditionalProperties/_Type.Property.AdditionalProperties.Tests.csproj b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Property/AdditionalProperties/_Type.Property.AdditionalProperties.Tests.csproj new file mode 100644 index 00000000000..96f9a241e4b --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Property/AdditionalProperties/_Type.Property.AdditionalProperties.Tests.csproj @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + Always + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Property/Nullable/_Type.Property.Nullable.Tests.csproj b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Property/Nullable/_Type.Property.Nullable.Tests.csproj new file mode 100644 index 00000000000..0e5503250e6 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Property/Nullable/_Type.Property.Nullable.Tests.csproj @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Property/Optionality/_Type.Property.Optionality.Tests.csproj b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Property/Optionality/_Type.Property.Optionality.Tests.csproj new file mode 100644 index 00000000000..0e7283e9a7b --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Property/Optionality/_Type.Property.Optionality.Tests.csproj @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Property/ValueTypes/_Type.Property.ValueTypes.Tests.csproj b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Property/ValueTypes/_Type.Property.ValueTypes.Tests.csproj new file mode 100644 index 00000000000..2417c80a420 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Property/ValueTypes/_Type.Property.ValueTypes.Tests.csproj @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Scalar/_Type.Scalar.Tests.csproj b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Scalar/_Type.Scalar.Tests.csproj new file mode 100644 index 00000000000..54a96088d83 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Scalar/_Type.Scalar.Tests.csproj @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Union/_Type.Union.Tests.csproj b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Union/_Type.Union.Tests.csproj new file mode 100644 index 00000000000..a1413316f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Union/_Type.Union.Tests.csproj @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/_Array/_Type._Array.Tests.csproj b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/_Array/_Type._Array.Tests.csproj new file mode 100644 index 00000000000..2b3d621a138 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/_Array/_Type._Array.Tests.csproj @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/_Enum/Extensible/_Type._Enum.Extensible.Tests.csproj b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/_Enum/Extensible/_Type._Enum.Extensible.Tests.csproj new file mode 100644 index 00000000000..1c34deb39f1 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/_Enum/Extensible/_Type._Enum.Extensible.Tests.csproj @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/_Enum/Fixed/_Type._Enum.Fixed.Tests.csproj b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/_Enum/Fixed/_Type._Enum.Fixed.Tests.csproj new file mode 100644 index 00000000000..b883ee855a1 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/_Enum/Fixed/_Type._Enum.Fixed.Tests.csproj @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Infrastructure/CadlRanchTestAttribute.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Infrastructure/CadlRanchTestAttribute.cs index 29897ff980b..da8d390c67f 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Infrastructure/CadlRanchTestAttribute.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Infrastructure/CadlRanchTestAttribute.cs @@ -15,7 +15,7 @@ namespace TestProjects.CadlRanch.Tests { [AttributeUsage(AttributeTargets.Method, AllowMultiple = false)] - internal partial class CadlRanchTestAttribute : TestAttribute, IApplyToTest + public partial class CadlRanchTestAttribute : TestAttribute, IApplyToTest { [GeneratedRegex("(?<=[a-z])([A-Z])")] private static partial Regex ToKebabCase(); diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/TestProjects.CadlRanch.Tests.csproj b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/TestProjects.CadlRanch.Tests.csproj index dbee57ff6cf..e5b28062e5d 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/TestProjects.CadlRanch.Tests.csproj +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/TestProjects.CadlRanch.Tests.csproj @@ -7,67 +7,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -81,10 +21,10 @@ - +