From 66c349d793838e2ebd35daa2b38db1bf5ca15417 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Thu, 9 Jan 2025 16:13:26 +0800 Subject: [PATCH] fix test case compilation --- .../Client/Structure/Default/DefaultTests.cs | 3 +- .../Structure/MultiClient/MultiClientTests.cs | 2 +- .../RenamedOperation/RenamedOperationTests.cs | 2 +- .../TwoOperationGroupTests.cs | 6 ++-- .../SingleDiscriminator/EagleTests.cs | 2 +- .../DifferentSpreadStringDerivedTests.cs | 2 +- .../MultipleSpreadRecordTests.cs | 2 +- .../_Type/_Enum/Extensible/ExtensibleTests.cs | 1 - .../Http/_Type/_Enum/Fixed/FixedTests.cs | 1 - .../TestProjects.CadlRanch.Tests.csproj | 30 +++++++++++++++++++ 10 files changed, 39 insertions(+), 12 deletions(-) diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/Client/Structure/Default/DefaultTests.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/Client/Structure/Default/DefaultTests.cs index fae20c8f35..b99f6116c6 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/Client/Structure/Default/DefaultTests.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/Client/Structure/Default/DefaultTests.cs @@ -4,9 +4,8 @@ using System; using System.Linq; using System.Threading.Tasks; +using Client.Structure.Service; using Client.Structure.Service.Default; -using Client.Structure.Service.Default.Models; -using Client.Structure.Service.Renamed.Operation; using NUnit.Framework; namespace TestProjects.CadlRanch.Tests.Http.Client.Structure.Default diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/Client/Structure/MultiClient/MultiClientTests.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/Client/Structure/MultiClient/MultiClientTests.cs index f844fe75b3..1a3ad4b8b5 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/Client/Structure/MultiClient/MultiClientTests.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/Client/Structure/MultiClient/MultiClientTests.cs @@ -3,8 +3,8 @@ using System.Linq; using System.Threading.Tasks; +using Client.Structure.Service; using Client.Structure.Service.Multi.Client; -using Client.Structure.Service.Multi.Client.Models; using NUnit.Framework; namespace TestProjects.CadlRanch.Tests.Http.Client.Structure.MultiClient diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/Client/Structure/RenamedOperation/RenamedOperationTests.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/Client/Structure/RenamedOperation/RenamedOperationTests.cs index 461cb0a257..5da50b2c36 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/Client/Structure/RenamedOperation/RenamedOperationTests.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/Client/Structure/RenamedOperation/RenamedOperationTests.cs @@ -3,8 +3,8 @@ using System.Linq; using System.Threading.Tasks; +using Client.Structure.Service; using Client.Structure.Service.Renamed.Operation; -using Client.Structure.Service.Renamed.Operation.Models; using NUnit.Framework; namespace TestProjects.CadlRanch.Tests.Http.Client.Structure.RenamedOperation diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/Client/Structure/TwoOperationGroup/TwoOperationGroupTests.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/Client/Structure/TwoOperationGroup/TwoOperationGroupTests.cs index d279369d17..8894b791a0 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/Client/Structure/TwoOperationGroup/TwoOperationGroupTests.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/Client/Structure/TwoOperationGroup/TwoOperationGroupTests.cs @@ -1,12 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using Client.Structure.Service.TwoOperationGroup; -using Client.Structure.Service.TwoOperationGroup.Models; -using NUnit.Framework; using System.ClientModel; using System.Linq; using System.Threading.Tasks; +using Client.Structure.Service; +using Client.Structure.Service.TwoOperationGroup; +using NUnit.Framework; namespace TestProjects.CadlRanch.Tests.Http.Client.Structure.TwoOperationGroup { diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Model/Inheritance/SingleDiscriminator/EagleTests.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Model/Inheritance/SingleDiscriminator/EagleTests.cs index 7f0c3cd98b..11a5b62c9d 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Model/Inheritance/SingleDiscriminator/EagleTests.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Model/Inheritance/SingleDiscriminator/EagleTests.cs @@ -3,7 +3,7 @@ using System.ClientModel; using System.IO; -using _Type.Model.Inheritance.SingleDiscriminator.Models; +using _Type.Model.Inheritance.SingleDiscriminator; using Microsoft.Generator.CSharp.Tests.Common; using NUnit.Framework; using TestProjects.CadlRanch.Tests.Infrastructure; diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Property/AdditionalProperties/DifferentSpreadStringDerivedTests.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Property/AdditionalProperties/DifferentSpreadStringDerivedTests.cs index 94c570f854..4aecd0785c 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Property/AdditionalProperties/DifferentSpreadStringDerivedTests.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Property/AdditionalProperties/DifferentSpreadStringDerivedTests.cs @@ -3,7 +3,7 @@ using System.ClientModel; using System.IO; -using _Type.Property.AdditionalProperties.Models; +using _Type.Property.AdditionalProperties; using Microsoft.Generator.CSharp.Tests.Common; using NUnit.Framework; using TestProjects.CadlRanch.Tests.Infrastructure; diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Property/AdditionalProperties/MultipleSpreadRecordTests.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Property/AdditionalProperties/MultipleSpreadRecordTests.cs index d90ec87c10..66365ea9e1 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Property/AdditionalProperties/MultipleSpreadRecordTests.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/Property/AdditionalProperties/MultipleSpreadRecordTests.cs @@ -3,7 +3,7 @@ using System.ClientModel; using System.IO; -using _Type.Property.AdditionalProperties.Models; +using _Type.Property.AdditionalProperties; using Microsoft.Generator.CSharp.Tests.Common; using NUnit.Framework; using TestProjects.CadlRanch.Tests.Infrastructure; diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/_Enum/Extensible/ExtensibleTests.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/_Enum/Extensible/ExtensibleTests.cs index eb02a16289..e333825b4e 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/_Enum/Extensible/ExtensibleTests.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/_Enum/Extensible/ExtensibleTests.cs @@ -3,7 +3,6 @@ using System.Threading.Tasks; using _Type._Enum.Extensible; -using _Type._Enum.Extensible.Models; using NUnit.Framework; namespace TestProjects.CadlRanch.Tests.Http._Type._Enum.Extensible diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/_Enum/Fixed/FixedTests.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/_Enum/Fixed/FixedTests.cs index 0feca09ff1..5f7ab66d06 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/_Enum/Fixed/FixedTests.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/_Type/_Enum/Fixed/FixedTests.cs @@ -5,7 +5,6 @@ using System.ClientModel; using System.Threading.Tasks; using _Type._Enum.Fixed; -using _Type._Enum.Fixed.Models; using NUnit.Framework; namespace TestProjects.CadlRanch.Tests.Http._Type._Enum.Fixed 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 764f9d794b..d2559be0b6 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 @@ -10,6 +10,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +