mirror of
				https://github.com/nsnail/spectre.console.git
				synced 2025-11-01 01:25:27 +08:00 
			
		
		
		
	Update dependencies
* Add support for C# 12 * Run all tests on all major .NET SDKs * Only build on Ubuntu * Do not build docs for pull requests * Add Cédric Luthi, and Frank Ray to authors * Drop netstandard2.0 for ImageSharp plugin
This commit is contained in:
		 Patrik Svensson
					Patrik Svensson
				
			
				
					committed by
					
						 Patrik Svensson
						Patrik Svensson
					
				
			
			
				
	
			
			
			 Patrik Svensson
						Patrik Svensson
					
				
			
						parent
						
							703d653ec5
						
					
				
				
					commit
					b21e07ea94
				
			
							
								
								
									
										54
									
								
								.github/workflows/ci.yaml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										54
									
								
								.github/workflows/ci.yaml
									
									
									
									
										vendored
									
									
								
							| @@ -8,48 +8,6 @@ env: | ||||
|  | ||||
| jobs: | ||||
|  | ||||
|   ################################################### | ||||
|   # DOCS | ||||
|   ################################################### | ||||
|  | ||||
|   docs: | ||||
|     name: Documentation | ||||
|     runs-on: ubuntu-latest | ||||
|     steps: | ||||
|     - name: Checkout | ||||
|       uses: actions/checkout@master | ||||
|  | ||||
|     - name: Setup .NET SDK | ||||
|       uses: actions/setup-dotnet@v3 | ||||
|  | ||||
|     - name: Setup Node.js | ||||
|       uses: actions/setup-node@v3 | ||||
|       with: | ||||
|         node-version: '16' | ||||
|  | ||||
|     - name: Cache dependencies | ||||
|       uses: actions/cache@v3 | ||||
|       with: | ||||
|         path: ~/.npm | ||||
|         key: npm-${{ hashFiles('package-lock.json') }} | ||||
|         restore-keys: npm- | ||||
|  | ||||
|     - name: Build | ||||
|       shell: bash | ||||
|       env: | ||||
|         GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||
|       run: | | ||||
|         cd docs | ||||
|         dotnet tool restore | ||||
|         dotnet run --configuration Release | ||||
|  | ||||
|     - name: Archive doc generation | ||||
|       uses: actions/upload-artifact@v3 | ||||
|       with: | ||||
|         name: documentation-output | ||||
|         path: docs/output/ | ||||
|         retention-days: 5 | ||||
|  | ||||
|   ################################################### | ||||
|   # BUILD | ||||
|   ################################################### | ||||
| @@ -57,17 +15,7 @@ jobs: | ||||
|   build: | ||||
|     name: Build | ||||
|     if: "!contains(github.event.head_commit.message, 'skip-ci')" | ||||
|     strategy: | ||||
|       matrix: | ||||
|         kind: ['linux', 'windows', 'macOS'] | ||||
|         include: | ||||
|           - kind: linux | ||||
|             os: ubuntu-latest | ||||
|           - kind: windows | ||||
|             os: windows-latest | ||||
|           - kind: macOS | ||||
|             os: macos-latest | ||||
|     runs-on: ${{ matrix.os }} | ||||
|     runs-on: ubuntu-latest | ||||
|     steps: | ||||
|       - name: Checkout | ||||
|         uses: actions/checkout@v3 | ||||
|   | ||||
							
								
								
									
										65
									
								
								.github/workflows/publish.yaml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										65
									
								
								.github/workflows/publish.yaml
									
									
									
									
										vendored
									
									
								
							| @@ -15,26 +15,13 @@ env: | ||||
| jobs: | ||||
|  | ||||
|   ################################################### | ||||
|   # BUILD | ||||
|   # PUBLISH | ||||
|   ################################################### | ||||
|  | ||||
|   build: | ||||
|     name: Build | ||||
|     if: | | ||||
|       (!startsWith(github.event.head_commit.message, 'skip-ci')  | ||||
|       && !startsWith(github.event.head_commit.message, 'chore:')) | ||||
|       || startsWith(github.ref, 'refs/tags/') | ||||
|     strategy: | ||||
|       matrix: | ||||
|         kind: ['linux', 'windows', 'macOS'] | ||||
|         include: | ||||
|           - kind: linux | ||||
|             os: ubuntu-latest | ||||
|           - kind: windows | ||||
|             os: windows-latest | ||||
|           - kind: macOS | ||||
|             os: macos-latest | ||||
|     runs-on: ${{ matrix.os }} | ||||
|     name: Publish NuGet Packages | ||||
|     if: "!contains(github.event.head_commit.message, 'skip-ci') || startsWith(github.ref, 'refs/tags/')" | ||||
|     runs-on: ubuntu-latest | ||||
|     steps: | ||||
|       - name: Checkout | ||||
|         uses: actions/checkout@v3 | ||||
| @@ -43,12 +30,19 @@ jobs: | ||||
|  | ||||
|       - name: Setup .NET SDK | ||||
|         uses: actions/setup-dotnet@v3 | ||||
|         with: | ||||
|           dotnet-version: | | ||||
|             6.0.x | ||||
|             7.0.x | ||||
|             8.0.x | ||||
|  | ||||
|       - name: Build | ||||
|       - name: Publish | ||||
|         shell: bash | ||||
|         run: | | ||||
|           dotnet tool restore | ||||
|           dotnet cake | ||||
|           dotnet cake --target="publish" \ | ||||
|             --nuget-key="${{secrets.NUGET_API_KEY}}" \ | ||||
|             --github-key="${{secrets.GITHUB_TOKEN}}" | ||||
|  | ||||
|   ################################################### | ||||
|   # DOCS | ||||
| @@ -88,35 +82,4 @@ jobs: | ||||
|       run: | | ||||
|         cd docs | ||||
|         dotnet tool restore | ||||
|         dotnet run --configuration Release -- deploy | ||||
|  | ||||
|   ################################################### | ||||
|   # PUBLISH | ||||
|   ################################################### | ||||
|  | ||||
|   publish: | ||||
|     name: Publish NuGet Packages | ||||
|     needs: [build] | ||||
|     if: "!contains(github.event.head_commit.message, 'skip-ci') || startsWith(github.ref, 'refs/tags/')" | ||||
|     runs-on: ubuntu-latest | ||||
|     steps: | ||||
|       - name: Checkout | ||||
|         uses: actions/checkout@v3 | ||||
|         with: | ||||
|           fetch-depth: 0 | ||||
|  | ||||
|       - name: Setup .NET SDK | ||||
|         uses: actions/setup-dotnet@v3 | ||||
|         with: | ||||
|           dotnet-version: | | ||||
|             6.0.x | ||||
|             7.0.x | ||||
|             8.0.x | ||||
|  | ||||
|       - name: Publish | ||||
|         shell: bash | ||||
|         run: | | ||||
|           dotnet tool restore | ||||
|           dotnet cake --target="publish" \ | ||||
|             --nuget-key="${{secrets.NUGET_API_KEY}}" \ | ||||
|             --github-key="${{secrets.GITHUB_TOKEN}}" | ||||
|         dotnet run --configuration Release -- deploy | ||||
| @@ -1,7 +1,7 @@ | ||||
| <Project> | ||||
|   <PropertyGroup Label="Settings"> | ||||
|     <Deterministic>true</Deterministic> | ||||
|     <LangVersion>10</LangVersion> | ||||
|     <LangVersion>12</LangVersion> | ||||
|     <DebugSymbols>true</DebugSymbols> | ||||
|     <DebugType>embedded</DebugType> | ||||
|     <MinVerSkip Condition="'$(Configuration)' == 'Debug'">true</MinVerSkip> | ||||
| @@ -15,8 +15,8 @@ | ||||
|  | ||||
|   <PropertyGroup Label="Package Information"> | ||||
|     <Description>A library that makes it easier to create beautiful console applications.</Description> | ||||
|     <Copyright>Patrik Svensson, Phil Scott, Nils Andresen</Copyright> | ||||
|     <Authors>Patrik Svensson, Phil Scott, Nils Andresen</Authors> | ||||
|     <Copyright>Patrik Svensson, Phil Scott, Nils Andresen, Cédric Luthi, Frank Ray</Copyright> | ||||
|     <Authors>Patrik Svensson, Phil Scott, Nils Andresen, Cédric Luthi, Frank Ray</Authors> | ||||
|     <RepositoryType>git</RepositoryType> | ||||
|     <RepositoryUrl>https://github.com/spectreconsole/spectre.console</RepositoryUrl> | ||||
|     <PackageIcon>small-logo.png</PackageIcon> | ||||
| @@ -33,12 +33,12 @@ | ||||
|  | ||||
|   <!-- Allow folks to build with minimal dependencies (though they will need to provide their own Version data) --> | ||||
|   <ItemGroup Label="Build Tools Package References" Condition="'$(UseBuildTimeTools)' != 'false'"> | ||||
|     <PackageReference Include="MinVer" PrivateAssets="All" Version="4.2.0" /> | ||||
|     <PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" Version="1.1.1" /> | ||||
|     <PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.435"> | ||||
|     <PackageReference Include="MinVer" PrivateAssets="All" Version="4.3.0" /> | ||||
|     <PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" Version="8.0.0" /> | ||||
|     <PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556"> | ||||
|       <PrivateAssets>All</PrivateAssets> | ||||
|     </PackageReference> | ||||
|     <PackageReference Include="Roslynator.Analyzers" Version="4.1.2"> | ||||
|     <PackageReference Include="Roslynator.Analyzers" Version="4.10.0"> | ||||
|       <PrivateAssets>All</PrivateAssets> | ||||
|     </PackageReference> | ||||
|   </ItemGroup> | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| <Project> | ||||
|   <Target Name="Versioning" BeforeTargets="MinVer"> | ||||
|     <PropertyGroup Label="Build"> | ||||
|       <MinVerDefaultPreReleasePhase>preview</MinVerDefaultPreReleasePhase> | ||||
|       <MinVerDefaultPreReleaseIdentifiers>preview.0</MinVerDefaultPreReleaseIdentifiers> | ||||
|       <MinVerVerbosity>normal</MinVerVerbosity> | ||||
|     </PropertyGroup> | ||||
|   </Target> | ||||
|   | ||||
| @@ -31,19 +31,19 @@ | ||||
|     </PackageReference> | ||||
|   </ItemGroup> | ||||
|  | ||||
|   <ItemGroup> | ||||
|     <Compile Update="Resources\HelpProvider.Designer.cs"> | ||||
|       <DesignTime>True</DesignTime> | ||||
|       <AutoGen>True</AutoGen> | ||||
|       <DependentUpon>HelpProvider.resx</DependentUpon> | ||||
|     </Compile> | ||||
|   <ItemGroup> | ||||
|     <Compile Update="Resources\HelpProvider.Designer.cs"> | ||||
|       <DesignTime>True</DesignTime> | ||||
|       <AutoGen>True</AutoGen> | ||||
|       <DependentUpon>HelpProvider.resx</DependentUpon> | ||||
|     </Compile> | ||||
|   </ItemGroup> | ||||
|  | ||||
|   <ItemGroup> | ||||
|     <EmbeddedResource Update="Resources\HelpProvider.resx"> | ||||
|       <Generator>ResXFileCodeGenerator</Generator> | ||||
|       <LastGenOutput>HelpProvider.Designer.cs</LastGenOutput> | ||||
|     </EmbeddedResource> | ||||
|   <ItemGroup> | ||||
|     <EmbeddedResource Update="Resources\HelpProvider.resx"> | ||||
|       <Generator>ResXFileCodeGenerator</Generator> | ||||
|       <LastGenOutput>HelpProvider.Designer.cs</LastGenOutput> | ||||
|     </EmbeddedResource> | ||||
|   </ItemGroup> | ||||
|  | ||||
| </Project> | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| <Project Sdk="Microsoft.NET.Sdk"> | ||||
|  | ||||
|   <PropertyGroup> | ||||
|     <TargetFrameworks>net8.0;net7.0;net6.0;netstandard2.0</TargetFrameworks> | ||||
|     <TargetFrameworks>net8.0;net7.0;net6.0</TargetFrameworks> | ||||
|     <Nullable>enable</Nullable> | ||||
|     <IsPackable>true</IsPackable> | ||||
|     <Description>A library that extends Spectre.Console with ImageSharp superpowers.</Description> | ||||
| @@ -13,7 +13,7 @@ | ||||
|   </ItemGroup> | ||||
|  | ||||
|   <ItemGroup> | ||||
|     <PackageReference Include="SixLabors.ImageSharp" Version="2.1.3" /> | ||||
|     <PackageReference Include="SixLabors.ImageSharp" Version="3.1.2" /> | ||||
|   </ItemGroup> | ||||
|  | ||||
|   <ItemGroup> | ||||
|   | ||||
| @@ -13,7 +13,7 @@ | ||||
|     <Compile Include="..\Spectre.Console\Internal\Extensions\EnumerableExtensions.cs" Link="Internal\EnumerableExtensions.cs" /> | ||||
|     <Compile Include="..\Spectre.Console\Internal\Text\StringBuffer.cs" Link="Internal\StringBuffer.cs" /> | ||||
|   </ItemGroup> | ||||
|    | ||||
|  | ||||
|   <ItemGroup> | ||||
|     <AdditionalFiles Include="..\stylecop.json" Link="Properties/stylecop.json" /> | ||||
|     <None Include="../../resources/gfx/small-logo.png" Pack="true" PackagePath="\" Link="Properties/small-logo.png" /> | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| <Project Sdk="Microsoft.NET.Sdk"> | ||||
|  | ||||
|   <PropertyGroup> | ||||
|     <TargetFrameworks>net8.0;net7.0;net6.0;netstandard2.0</TargetFrameworks> | ||||
|     <TargetFrameworks>net8.0;net7.0;net6.0</TargetFrameworks> | ||||
|     <IsTestProject>false</IsTestProject> | ||||
|     <Nullable>enable</Nullable> | ||||
|     <IsPackable>true</IsPackable> | ||||
|   | ||||
| @@ -16,8 +16,8 @@ | ||||
|   </ItemGroup> | ||||
|  | ||||
|   <ItemGroup> | ||||
|     <PackageReference Include="System.Memory" Version="4.5.5" /> | ||||
|     <PackageReference Include="Wcwidth.Sources" Version="1.0.0"> | ||||
|     <PackageReference Condition="'$(TargetFramework)' == 'netstandard2.0'" Include="System.Memory" Version="4.5.5" /> | ||||
|     <PackageReference Include="Wcwidth.Sources" Version="2.0.0"> | ||||
|       <PrivateAssets>all</PrivateAssets> | ||||
|     </PackageReference> | ||||
|   </ItemGroup> | ||||
|   | ||||
| @@ -6,10 +6,10 @@ | ||||
|   </PropertyGroup> | ||||
|  | ||||
|   <ItemGroup Label="Package References"> | ||||
|     <PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.435"> | ||||
|     <PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556"> | ||||
|       <PrivateAssets>All</PrivateAssets> | ||||
|     </PackageReference> | ||||
|     <PackageReference Include="Roslynator.Analyzers" Version="4.1.2"> | ||||
|     <PackageReference Include="Roslynator.Analyzers" Version="4.10.0"> | ||||
|       <PrivateAssets>All</PrivateAssets> | ||||
|     </PackageReference> | ||||
|   </ItemGroup> | ||||
|   | ||||
| @@ -13,9 +13,9 @@ | ||||
|     <PackageReference Include="Microsoft.CodeAnalysis.CSharp.Analyzer.Testing.XUnit" Version="1.1.1" /> | ||||
|     <PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeFix.Testing.XUnit" Version="1.1.1" /> | ||||
|     <PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.8.0" /> | ||||
|     <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.2" /> | ||||
|     <PackageReference Include="xunit" Version="2.4.2" /> | ||||
|     <PackageReference Include="xunit.runner.visualstudio" Version="2.4.5"> | ||||
|     <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" /> | ||||
|     <PackageReference Include="xunit" Version="2.6.6" /> | ||||
|     <PackageReference Include="xunit.runner.visualstudio" Version="2.5.6"> | ||||
|       <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||||
|       <PrivateAssets>all</PrivateAssets> | ||||
|     </PackageReference> | ||||
|   | ||||
| @@ -12,7 +12,7 @@ public class NoCurrentLiveRenderablesTests | ||||
|         const string Source = @" | ||||
| using Spectre.Console; | ||||
|  | ||||
| class TestClass  | ||||
| class TestClass | ||||
| { | ||||
|     void Go() | ||||
|     { | ||||
| @@ -24,8 +24,7 @@ class TestClass | ||||
| }"; | ||||
|  | ||||
|         await SpectreAnalyzerVerifier<NoConcurrentLiveRenderablesAnalyzer> | ||||
|             .VerifyAnalyzerAsync(Source, _expectedDiagnostics.WithLocation(10, 13)) | ||||
|             .ConfigureAwait(false); | ||||
|             .VerifyAnalyzerAsync(Source, _expectedDiagnostics.WithLocation(10, 13)); | ||||
|     } | ||||
|  | ||||
|     [Fact] | ||||
| @@ -48,8 +47,7 @@ class Child | ||||
| }"; | ||||
|  | ||||
|         await SpectreAnalyzerVerifier<NoConcurrentLiveRenderablesAnalyzer> | ||||
|             .VerifyAnalyzerAsync(Source, _expectedDiagnostics.WithLocation(12, 13)) | ||||
|             .ConfigureAwait(false); | ||||
|             .VerifyAnalyzerAsync(Source, _expectedDiagnostics.WithLocation(12, 13)); | ||||
|     } | ||||
|  | ||||
|     [Fact] | ||||
| @@ -69,7 +67,6 @@ class Program | ||||
| }"; | ||||
|  | ||||
|         await SpectreAnalyzerVerifier<NoConcurrentLiveRenderablesAnalyzer> | ||||
|             .VerifyAnalyzerAsync(Source) | ||||
|             .ConfigureAwait(false); | ||||
|             .VerifyAnalyzerAsync(Source); | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -12,7 +12,7 @@ public class NoPromptsDuringLiveRenderablesTests | ||||
|         const string Source = @" | ||||
| using Spectre.Console; | ||||
|  | ||||
| class TestClass  | ||||
| class TestClass | ||||
| { | ||||
|     void Go() | ||||
|     { | ||||
| @@ -21,8 +21,7 @@ class TestClass | ||||
| }"; | ||||
|  | ||||
|         await SpectreAnalyzerVerifier<NoPromptsDuringLiveRenderablesAnalyzer> | ||||
|             .VerifyAnalyzerAsync(Source) | ||||
|             .ConfigureAwait(false); | ||||
|             .VerifyAnalyzerAsync(Source); | ||||
|     } | ||||
|  | ||||
|     [Fact] | ||||
| @@ -31,7 +30,7 @@ class TestClass | ||||
|         const string Source = @" | ||||
| using Spectre.Console; | ||||
|  | ||||
| class TestClass  | ||||
| class TestClass | ||||
| { | ||||
|     public IAnsiConsole _console = AnsiConsole.Console; | ||||
|  | ||||
| @@ -45,8 +44,7 @@ class TestClass | ||||
| }"; | ||||
|  | ||||
|         await SpectreAnalyzerVerifier<NoPromptsDuringLiveRenderablesAnalyzer> | ||||
|             .VerifyAnalyzerAsync(Source, _expectedDiagnostics.WithLocation(12, 26)) | ||||
|             .ConfigureAwait(false); | ||||
|             .VerifyAnalyzerAsync(Source, _expectedDiagnostics.WithLocation(12, 26)); | ||||
|     } | ||||
|  | ||||
|     [Fact] | ||||
| @@ -55,7 +53,7 @@ class TestClass | ||||
|         const string Source = @" | ||||
| using Spectre.Console; | ||||
|  | ||||
| class TestClass  | ||||
| class TestClass | ||||
| { | ||||
|     void Go() | ||||
|     { | ||||
| @@ -67,8 +65,7 @@ class TestClass | ||||
| }"; | ||||
|  | ||||
|         await SpectreAnalyzerVerifier<NoPromptsDuringLiveRenderablesAnalyzer> | ||||
|             .VerifyAnalyzerAsync(Source, _expectedDiagnostics.WithLocation(10, 13)) | ||||
|             .ConfigureAwait(false); | ||||
|             .VerifyAnalyzerAsync(Source, _expectedDiagnostics.WithLocation(10, 13)); | ||||
|     } | ||||
|  | ||||
|     [Fact] | ||||
| @@ -92,7 +89,6 @@ class Program | ||||
| }"; | ||||
|  | ||||
|         await SpectreAnalyzerVerifier<NoPromptsDuringLiveRenderablesAnalyzer> | ||||
|             .VerifyAnalyzerAsync(Source) | ||||
|             .ConfigureAwait(false); | ||||
|             .VerifyAnalyzerAsync(Source); | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -24,8 +24,7 @@ internal sealed class Foo | ||||
| "; | ||||
|  | ||||
|         await SpectreAnalyzerVerifier<FavorInstanceAnsiConsoleOverStaticAnalyzer> | ||||
|             .VerifyAnalyzerAsync(Source) | ||||
|             .ConfigureAwait(false); | ||||
|             .VerifyAnalyzerAsync(Source); | ||||
|     } | ||||
|  | ||||
|     [Fact] | ||||
| @@ -34,19 +33,18 @@ internal sealed class Foo | ||||
|         const string Source = @" | ||||
| using Spectre.Console; | ||||
|  | ||||
| class TestClass  | ||||
| class TestClass | ||||
| { | ||||
|     IAnsiConsole _ansiConsole = AnsiConsole.Console;     | ||||
|     IAnsiConsole _ansiConsole = AnsiConsole.Console; | ||||
|  | ||||
|     void TestMethod()  | ||||
|     void TestMethod() | ||||
|     { | ||||
|         _ansiConsole.Write(""this is fine""); | ||||
|     }  | ||||
|     } | ||||
| }"; | ||||
|  | ||||
|         await SpectreAnalyzerVerifier<FavorInstanceAnsiConsoleOverStaticAnalyzer> | ||||
|             .VerifyAnalyzerAsync(Source) | ||||
|             .ConfigureAwait(false); | ||||
|             .VerifyAnalyzerAsync(Source); | ||||
|     } | ||||
|  | ||||
|     [Fact] | ||||
| @@ -55,17 +53,16 @@ class TestClass | ||||
|         const string Source = @" | ||||
| using Spectre.Console; | ||||
|  | ||||
| class TestClass  | ||||
| class TestClass | ||||
| { | ||||
|     void TestMethod()  | ||||
|     void TestMethod() | ||||
|     { | ||||
|         AnsiConsole.Write(""this is fine""); | ||||
|     }  | ||||
|     } | ||||
| }"; | ||||
|  | ||||
|         await SpectreAnalyzerVerifier<FavorInstanceAnsiConsoleOverStaticAnalyzer> | ||||
|             .VerifyAnalyzerAsync(Source) | ||||
|             .ConfigureAwait(false); | ||||
|             .VerifyAnalyzerAsync(Source); | ||||
|     } | ||||
|  | ||||
|     [Fact] | ||||
| @@ -74,19 +71,18 @@ class TestClass | ||||
|         const string Source = @" | ||||
| using Spectre.Console; | ||||
|  | ||||
| class TestClass  | ||||
| class TestClass | ||||
| { | ||||
|     IAnsiConsole _ansiConsole = AnsiConsole.Console;     | ||||
|     IAnsiConsole _ansiConsole = AnsiConsole.Console; | ||||
|  | ||||
|     void TestMethod()  | ||||
|     void TestMethod() | ||||
|     { | ||||
|         _ansiConsole.Write(""this is fine""); | ||||
|         AnsiConsole.Write(""Hello, World""); | ||||
|     }  | ||||
|     } | ||||
| }"; | ||||
|  | ||||
|         await SpectreAnalyzerVerifier<FavorInstanceAnsiConsoleOverStaticAnalyzer> | ||||
|             .VerifyAnalyzerAsync(Source, _expectedDiagnostics.WithLocation(11, 9)) | ||||
|             .ConfigureAwait(false); | ||||
|             .VerifyAnalyzerAsync(Source, _expectedDiagnostics.WithLocation(11, 9)); | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -13,15 +13,14 @@ public class UseSpectreInsteadOfSystemConsoleAnalyzerTests | ||||
| using System; | ||||
|  | ||||
| class TestClass { | ||||
|     void TestMethod()  | ||||
|     void TestMethod() | ||||
|     { | ||||
|         var s = Console.ReadLine(); | ||||
|     }  | ||||
|     } | ||||
| }"; | ||||
|  | ||||
|         await SpectreAnalyzerVerifier<UseSpectreInsteadOfSystemConsoleAnalyzer> | ||||
|             .VerifyAnalyzerAsync(Source) | ||||
|             .ConfigureAwait(false); | ||||
|             .VerifyAnalyzerAsync(Source); | ||||
|     } | ||||
|  | ||||
|     [Fact] | ||||
| @@ -31,15 +30,14 @@ class TestClass { | ||||
| using System; | ||||
|  | ||||
| class TestClass { | ||||
|     void TestMethod()  | ||||
|     void TestMethod() | ||||
|     { | ||||
|         Console.Write(""Hello, World""); | ||||
|     }  | ||||
|     } | ||||
| }"; | ||||
|  | ||||
|         await SpectreAnalyzerVerifier<UseSpectreInsteadOfSystemConsoleAnalyzer> | ||||
|             .VerifyAnalyzerAsync(Source, _expectedDiagnostics.WithLocation(7, 9)) | ||||
|             .ConfigureAwait(false); | ||||
|             .VerifyAnalyzerAsync(Source, _expectedDiagnostics.WithLocation(7, 9)); | ||||
|     } | ||||
|  | ||||
|     [Fact] | ||||
| @@ -48,7 +46,7 @@ class TestClass { | ||||
|         const string Source = @" | ||||
| using System; | ||||
|  | ||||
| class TestClass  | ||||
| class TestClass | ||||
| { | ||||
|     void TestMethod() { | ||||
|         Console.WriteLine(""Hello, World""); | ||||
| @@ -56,7 +54,6 @@ class TestClass | ||||
| }"; | ||||
|  | ||||
|         await SpectreAnalyzerVerifier<UseSpectreInsteadOfSystemConsoleAnalyzer> | ||||
|             .VerifyAnalyzerAsync(Source, _expectedDiagnostics.WithLocation(7, 9)) | ||||
|             .ConfigureAwait(false); | ||||
|             .VerifyAnalyzerAsync(Source, _expectedDiagnostics.WithLocation(7, 9)); | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -12,34 +12,33 @@ public class UseInstanceOfStaticAnsiConsoleTests | ||||
|         const string Source = @" | ||||
| using Spectre.Console; | ||||
|  | ||||
| class TestClass  | ||||
| class TestClass | ||||
| { | ||||
|     IAnsiConsole _ansiConsole = AnsiConsole.Console;     | ||||
|     IAnsiConsole _ansiConsole = AnsiConsole.Console; | ||||
|  | ||||
|     void TestMethod()  | ||||
|     void TestMethod() | ||||
|     { | ||||
|         _ansiConsole.Write(""this is fine""); | ||||
|         AnsiConsole.Write(""Hello, World""); | ||||
|     }  | ||||
|     } | ||||
| }"; | ||||
|  | ||||
|         const string FixedSource = @" | ||||
| using Spectre.Console; | ||||
|  | ||||
| class TestClass  | ||||
| class TestClass | ||||
| { | ||||
|     IAnsiConsole _ansiConsole = AnsiConsole.Console;     | ||||
|     IAnsiConsole _ansiConsole = AnsiConsole.Console; | ||||
|  | ||||
|     void TestMethod()  | ||||
|     void TestMethod() | ||||
|     { | ||||
|         _ansiConsole.Write(""this is fine""); | ||||
|         _ansiConsole.Write(""Hello, World""); | ||||
|     }  | ||||
|     } | ||||
| }"; | ||||
|  | ||||
|         await SpectreAnalyzerVerifier<FavorInstanceAnsiConsoleOverStaticAnalyzer> | ||||
|             .VerifyCodeFixAsync(Source, _expectedDiagnostic.WithLocation(11, 9), FixedSource) | ||||
|             .ConfigureAwait(false); | ||||
|             .VerifyCodeFixAsync(Source, _expectedDiagnostic.WithLocation(11, 9), FixedSource); | ||||
|     } | ||||
|  | ||||
|     [Fact] | ||||
| @@ -48,38 +47,37 @@ class TestClass | ||||
|         const string Source = @" | ||||
| using Spectre.Console; | ||||
|  | ||||
| class TestClass  | ||||
| class TestClass | ||||
| { | ||||
|     IAnsiConsole _ansiConsole = AnsiConsole.Console;     | ||||
|     IAnsiConsole _ansiConsole = AnsiConsole.Console; | ||||
|  | ||||
|     void TestMethod()  | ||||
|     void TestMethod() | ||||
|     { | ||||
|         var foo = 1; | ||||
|  | ||||
|         AnsiConsole.Write(""this is fine""); | ||||
|         _ansiConsole.Write(""Hello, World""); | ||||
|     }  | ||||
|     } | ||||
| }"; | ||||
|  | ||||
|         const string FixedSource = @" | ||||
| using Spectre.Console; | ||||
|  | ||||
| class TestClass  | ||||
| class TestClass | ||||
| { | ||||
|     IAnsiConsole _ansiConsole = AnsiConsole.Console;     | ||||
|     IAnsiConsole _ansiConsole = AnsiConsole.Console; | ||||
|  | ||||
|     void TestMethod()  | ||||
|     void TestMethod() | ||||
|     { | ||||
|         var foo = 1; | ||||
|  | ||||
|         _ansiConsole.Write(""this is fine""); | ||||
|         _ansiConsole.Write(""Hello, World""); | ||||
|     }  | ||||
|     } | ||||
| }"; | ||||
|  | ||||
|         await SpectreAnalyzerVerifier<FavorInstanceAnsiConsoleOverStaticAnalyzer> | ||||
|             .VerifyCodeFixAsync(Source, _expectedDiagnostic.WithLocation(12, 9), FixedSource) | ||||
|             .ConfigureAwait(false); | ||||
|             .VerifyCodeFixAsync(Source, _expectedDiagnostic.WithLocation(12, 9), FixedSource); | ||||
|     } | ||||
|  | ||||
|     [Fact] | ||||
| @@ -88,28 +86,27 @@ class TestClass | ||||
|         const string Source = @" | ||||
| using Spectre.Console; | ||||
|  | ||||
| class TestClass  | ||||
| class TestClass | ||||
| { | ||||
|     void TestMethod(IAnsiConsole ansiConsole)  | ||||
|     void TestMethod(IAnsiConsole ansiConsole) | ||||
|     { | ||||
|         AnsiConsole.Write(""Hello, World""); | ||||
|     }  | ||||
|     } | ||||
| }"; | ||||
|  | ||||
|         const string FixedSource = @" | ||||
| using Spectre.Console; | ||||
|  | ||||
| class TestClass  | ||||
| class TestClass | ||||
| { | ||||
|     void TestMethod(IAnsiConsole ansiConsole)  | ||||
|     void TestMethod(IAnsiConsole ansiConsole) | ||||
|     { | ||||
|         ansiConsole.Write(""Hello, World""); | ||||
|     }  | ||||
|     } | ||||
| }"; | ||||
|  | ||||
|         await SpectreAnalyzerVerifier<FavorInstanceAnsiConsoleOverStaticAnalyzer> | ||||
|             .VerifyCodeFixAsync(Source, _expectedDiagnostic.WithLocation(8, 9), FixedSource) | ||||
|             .ConfigureAwait(false); | ||||
|             .VerifyCodeFixAsync(Source, _expectedDiagnostic.WithLocation(8, 9), FixedSource); | ||||
|     } | ||||
|  | ||||
|     [Fact] | ||||
| @@ -118,33 +115,32 @@ class TestClass | ||||
|         const string Source = @" | ||||
| using Spectre.Console; | ||||
|  | ||||
| class TestClass  | ||||
| class TestClass | ||||
| { | ||||
|     static IAnsiConsole staticConsole; | ||||
|     IAnsiConsole instanceConsole; | ||||
|  | ||||
|     static void TestMethod()  | ||||
|     static void TestMethod() | ||||
|     { | ||||
|         AnsiConsole.Write(""Hello, World""); | ||||
|     }  | ||||
|     } | ||||
| }"; | ||||
|  | ||||
|         const string FixedSource = @" | ||||
| using Spectre.Console; | ||||
|  | ||||
| class TestClass  | ||||
| class TestClass | ||||
| { | ||||
|     static IAnsiConsole staticConsole; | ||||
|     IAnsiConsole instanceConsole; | ||||
|  | ||||
|     static void TestMethod()  | ||||
|     static void TestMethod() | ||||
|     { | ||||
|         staticConsole.Write(""Hello, World""); | ||||
|     }  | ||||
|     } | ||||
| }"; | ||||
|  | ||||
|         await SpectreAnalyzerVerifier<FavorInstanceAnsiConsoleOverStaticAnalyzer> | ||||
|             .VerifyCodeFixAsync(Source, _expectedDiagnostic.WithLocation(11, 9), FixedSource) | ||||
|             .ConfigureAwait(false); | ||||
|             .VerifyCodeFixAsync(Source, _expectedDiagnostic.WithLocation(11, 9), FixedSource); | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -12,9 +12,9 @@ public class UseSpectreInsteadOfSystemConsoleFixTests | ||||
|         const string Source = @" | ||||
| using System; | ||||
|  | ||||
| class TestClass  | ||||
| class TestClass | ||||
| { | ||||
|     void TestMethod()  | ||||
|     void TestMethod() | ||||
|     { | ||||
|         Console.WriteLine(""Hello, World""); | ||||
|     } | ||||
| @@ -24,17 +24,16 @@ class TestClass | ||||
| using System; | ||||
| using Spectre.Console; | ||||
|  | ||||
| class TestClass  | ||||
| class TestClass | ||||
| { | ||||
|     void TestMethod()  | ||||
|     void TestMethod() | ||||
|     { | ||||
|         AnsiConsole.WriteLine(""Hello, World""); | ||||
|     } | ||||
| }"; | ||||
|  | ||||
|         await SpectreAnalyzerVerifier<UseSpectreInsteadOfSystemConsoleAnalyzer> | ||||
|             .VerifyCodeFixAsync(Source, _expectedDiagnostic.WithLocation(8, 9), FixedSource) | ||||
|             .ConfigureAwait(false); | ||||
|             .VerifyCodeFixAsync(Source, _expectedDiagnostic.WithLocation(8, 9), FixedSource); | ||||
|     } | ||||
|  | ||||
|     [Fact] | ||||
| @@ -43,9 +42,9 @@ class TestClass | ||||
|         const string Source = @" | ||||
| using System; | ||||
|  | ||||
| class TestClass  | ||||
| class TestClass | ||||
| { | ||||
|     void TestMethod()  | ||||
|     void TestMethod() | ||||
|     { | ||||
|         Console.WriteLine(""Hello, World""); | ||||
|     } | ||||
| @@ -55,17 +54,16 @@ class TestClass | ||||
| using System; | ||||
| using Spectre.Console; | ||||
|  | ||||
| class TestClass  | ||||
| class TestClass | ||||
| { | ||||
|     void TestMethod()  | ||||
|     void TestMethod() | ||||
|     { | ||||
|         AnsiConsole.WriteLine(""Hello, World""); | ||||
|     } | ||||
| }"; | ||||
|  | ||||
|         await SpectreAnalyzerVerifier<UseSpectreInsteadOfSystemConsoleAnalyzer> | ||||
|             .VerifyCodeFixAsync(Source, _expectedDiagnostic.WithLocation(8, 9), FixedSource) | ||||
|             .ConfigureAwait(false); | ||||
|             .VerifyCodeFixAsync(Source, _expectedDiagnostic.WithLocation(8, 9), FixedSource); | ||||
|     } | ||||
|  | ||||
|     [Fact] | ||||
| @@ -75,11 +73,11 @@ class TestClass | ||||
| using System; | ||||
| using Spectre.Console; | ||||
|  | ||||
| class TestClass  | ||||
| class TestClass | ||||
| { | ||||
|     IAnsiConsole _ansiConsole; | ||||
|  | ||||
|     void TestMethod()  | ||||
|     void TestMethod() | ||||
|     { | ||||
|         Console.WriteLine(""Hello, World""); | ||||
|     } | ||||
| @@ -89,19 +87,18 @@ class TestClass | ||||
| using System; | ||||
| using Spectre.Console; | ||||
|  | ||||
| class TestClass  | ||||
| class TestClass | ||||
| { | ||||
|     IAnsiConsole _ansiConsole; | ||||
|  | ||||
|     void TestMethod()  | ||||
|     void TestMethod() | ||||
|     { | ||||
|         _ansiConsole.WriteLine(""Hello, World""); | ||||
|     } | ||||
| }"; | ||||
|  | ||||
|         await SpectreAnalyzerVerifier<UseSpectreInsteadOfSystemConsoleAnalyzer> | ||||
|             .VerifyCodeFixAsync(Source, _expectedDiagnostic.WithLocation(11, 9), FixedSource) | ||||
|             .ConfigureAwait(false); | ||||
|             .VerifyCodeFixAsync(Source, _expectedDiagnostic.WithLocation(11, 9), FixedSource); | ||||
|     } | ||||
|  | ||||
|     [Fact] | ||||
| @@ -111,9 +108,9 @@ class TestClass | ||||
| using System; | ||||
| using Spectre.Console; | ||||
|  | ||||
| class TestClass  | ||||
| class TestClass | ||||
| { | ||||
|     void TestMethod()  | ||||
|     void TestMethod() | ||||
|     { | ||||
|         IAnsiConsole ansiConsole = null; | ||||
|         Console.WriteLine(""Hello, World""); | ||||
| @@ -124,9 +121,9 @@ class TestClass | ||||
| using System; | ||||
| using Spectre.Console; | ||||
|  | ||||
| class TestClass  | ||||
| class TestClass | ||||
| { | ||||
|     void TestMethod()  | ||||
|     void TestMethod() | ||||
|     { | ||||
|         IAnsiConsole ansiConsole = null; | ||||
|         ansiConsole.WriteLine(""Hello, World""); | ||||
| @@ -134,8 +131,7 @@ class TestClass | ||||
| }"; | ||||
|  | ||||
|         await SpectreAnalyzerVerifier<UseSpectreInsteadOfSystemConsoleAnalyzer> | ||||
|             .VerifyCodeFixAsync(Source, _expectedDiagnostic.WithLocation(10, 9), FixedSource) | ||||
|             .ConfigureAwait(false); | ||||
|             .VerifyCodeFixAsync(Source, _expectedDiagnostic.WithLocation(10, 9), FixedSource); | ||||
|     } | ||||
|  | ||||
|     [Fact] | ||||
| @@ -145,9 +141,9 @@ class TestClass | ||||
| using System; | ||||
| using Spectre.Console; | ||||
|  | ||||
| class TestClass  | ||||
| class TestClass | ||||
| { | ||||
|     void TestMethod()  | ||||
|     void TestMethod() | ||||
|     { | ||||
|         Console.WriteLine(""Hello, World""); | ||||
|         IAnsiConsole ansiConsole; | ||||
| @@ -158,9 +154,9 @@ class TestClass | ||||
| using System; | ||||
| using Spectre.Console; | ||||
|  | ||||
| class TestClass  | ||||
| class TestClass | ||||
| { | ||||
|     void TestMethod()  | ||||
|     void TestMethod() | ||||
|     { | ||||
|         AnsiConsole.WriteLine(""Hello, World""); | ||||
|         IAnsiConsole ansiConsole; | ||||
| @@ -168,8 +164,7 @@ class TestClass | ||||
| }"; | ||||
|  | ||||
|         await SpectreAnalyzerVerifier<UseSpectreInsteadOfSystemConsoleAnalyzer> | ||||
|             .VerifyCodeFixAsync(Source, _expectedDiagnostic.WithLocation(9, 9), FixedSource) | ||||
|             .ConfigureAwait(false); | ||||
|             .VerifyCodeFixAsync(Source, _expectedDiagnostic.WithLocation(9, 9), FixedSource); | ||||
|     } | ||||
|  | ||||
|     [Fact] | ||||
| @@ -179,11 +174,11 @@ class TestClass | ||||
| using System; | ||||
| using Spectre.Console; | ||||
|  | ||||
| class TestClass  | ||||
| class TestClass | ||||
| { | ||||
|     static IAnsiConsole _ansiConsole; | ||||
|  | ||||
|     static void TestMethod()  | ||||
|     static void TestMethod() | ||||
|     { | ||||
|         Console.WriteLine(""Hello, World""); | ||||
|     } | ||||
| @@ -193,19 +188,18 @@ class TestClass | ||||
| using System; | ||||
| using Spectre.Console; | ||||
|  | ||||
| class TestClass  | ||||
| class TestClass | ||||
| { | ||||
|     static IAnsiConsole _ansiConsole; | ||||
|  | ||||
|     static void TestMethod()  | ||||
|     static void TestMethod() | ||||
|     { | ||||
|         _ansiConsole.WriteLine(""Hello, World""); | ||||
|     } | ||||
| }"; | ||||
|  | ||||
|         await SpectreAnalyzerVerifier<UseSpectreInsteadOfSystemConsoleAnalyzer> | ||||
|             .VerifyCodeFixAsync(Source, _expectedDiagnostic.WithLocation(11, 9), FixedSource) | ||||
|             .ConfigureAwait(false); | ||||
|             .VerifyCodeFixAsync(Source, _expectedDiagnostic.WithLocation(11, 9), FixedSource); | ||||
|     } | ||||
|  | ||||
|     [Fact] | ||||
| @@ -215,11 +209,11 @@ class TestClass | ||||
| using System; | ||||
| using Spectre.Console; | ||||
|  | ||||
| class TestClass  | ||||
| class TestClass | ||||
| { | ||||
|     IAnsiConsole _ansiConsole; | ||||
|  | ||||
|     static void TestMethod()  | ||||
|     static void TestMethod() | ||||
|     { | ||||
|         Console.WriteLine(""Hello, World""); | ||||
|     } | ||||
| @@ -229,19 +223,18 @@ class TestClass | ||||
| using System; | ||||
| using Spectre.Console; | ||||
|  | ||||
| class TestClass  | ||||
| class TestClass | ||||
| { | ||||
|     IAnsiConsole _ansiConsole; | ||||
|  | ||||
|     static void TestMethod()  | ||||
|     static void TestMethod() | ||||
|     { | ||||
|         AnsiConsole.WriteLine(""Hello, World""); | ||||
|     } | ||||
| }"; | ||||
|  | ||||
|         await SpectreAnalyzerVerifier<UseSpectreInsteadOfSystemConsoleAnalyzer> | ||||
|             .VerifyCodeFixAsync(Source, _expectedDiagnostic.WithLocation(11, 9), FixedSource) | ||||
|             .ConfigureAwait(false); | ||||
|             .VerifyCodeFixAsync(Source, _expectedDiagnostic.WithLocation(11, 9), FixedSource); | ||||
|     } | ||||
|  | ||||
|     [Fact] | ||||
| @@ -251,9 +244,9 @@ class TestClass | ||||
| using System; | ||||
| using Spectre.Console; | ||||
|  | ||||
| class TestClass  | ||||
| class TestClass | ||||
| { | ||||
|     static void TestMethod()  | ||||
|     static void TestMethod() | ||||
|     { | ||||
|         static void LocalFunction(IAnsiConsole ansiConsole) => Console.WriteLine(""Hello, World""); | ||||
|     } | ||||
| @@ -263,17 +256,16 @@ class TestClass | ||||
| using System; | ||||
| using Spectre.Console; | ||||
|  | ||||
| class TestClass  | ||||
| class TestClass | ||||
| { | ||||
|     static void TestMethod()  | ||||
|     static void TestMethod() | ||||
|     { | ||||
|         static void LocalFunction(IAnsiConsole ansiConsole) => ansiConsole.WriteLine(""Hello, World""); | ||||
|     } | ||||
| }"; | ||||
|  | ||||
|         await SpectreAnalyzerVerifier<UseSpectreInsteadOfSystemConsoleAnalyzer> | ||||
|             .VerifyCodeFixAsync(Source, _expectedDiagnostic.WithLocation(9, 64), FixedSource) | ||||
|             .ConfigureAwait(false); | ||||
|             .VerifyCodeFixAsync(Source, _expectedDiagnostic.WithLocation(9, 64), FixedSource); | ||||
|     } | ||||
|  | ||||
|     [Fact] | ||||
| @@ -283,9 +275,9 @@ class TestClass | ||||
| using System; | ||||
| using Spectre.Console; | ||||
|  | ||||
| class TestClass  | ||||
| class TestClass | ||||
| { | ||||
|     static void TestMethod()  | ||||
|     static void TestMethod() | ||||
|     { | ||||
|         IAnsiConsole ansiConsole = null; | ||||
|         static void LocalFunction() => Console.WriteLine(""Hello, World""); | ||||
| @@ -296,9 +288,9 @@ class TestClass | ||||
| using System; | ||||
| using Spectre.Console; | ||||
|  | ||||
| class TestClass  | ||||
| class TestClass | ||||
| { | ||||
|     static void TestMethod()  | ||||
|     static void TestMethod() | ||||
|     { | ||||
|         IAnsiConsole ansiConsole = null; | ||||
|         static void LocalFunction() => AnsiConsole.WriteLine(""Hello, World""); | ||||
| @@ -306,8 +298,7 @@ class TestClass | ||||
| }"; | ||||
|  | ||||
|         await SpectreAnalyzerVerifier<UseSpectreInsteadOfSystemConsoleAnalyzer> | ||||
|             .VerifyCodeFixAsync(Source, _expectedDiagnostic.WithLocation(10, 40), FixedSource) | ||||
|             .ConfigureAwait(false); | ||||
|             .VerifyCodeFixAsync(Source, _expectedDiagnostic.WithLocation(10, 40), FixedSource); | ||||
|     } | ||||
|  | ||||
|     [Fact] | ||||
| @@ -327,7 +318,7 @@ AnsiConsole.WriteLine(""Hello, World""); | ||||
| "; | ||||
|  | ||||
|         await SpectreAnalyzerVerifier<UseSpectreInsteadOfSystemConsoleAnalyzer> | ||||
|             .VerifyCodeFixAsync(Source, OutputKind.ConsoleApplication, _expectedDiagnostic.WithLocation(4, 1), FixedSource) | ||||
|             .ConfigureAwait(false); | ||||
|             .VerifyCodeFixAsync(Source, OutputKind.ConsoleApplication, _expectedDiagnostic.WithLocation(4, 1), | ||||
|                 FixedSource); | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -5,41 +5,4 @@ namespace Spectre.Console.Tests.Data; | ||||
| public abstract class AnimalCommand<TSettings> : Command<TSettings> | ||||
|     where TSettings : CommandSettings | ||||
| { | ||||
|     protected void DumpSettings(CommandContext context, TSettings settings) | ||||
|     { | ||||
|         if (context == null) | ||||
|         { | ||||
|             throw new ArgumentNullException(nameof(context)); | ||||
|         } | ||||
|  | ||||
|         if (settings == null) | ||||
|         { | ||||
|             throw new ArgumentNullException(nameof(settings)); | ||||
|         } | ||||
|  | ||||
|         var properties = settings.GetType().GetProperties(); | ||||
|         foreach (var group in properties.GroupBy(x => x.DeclaringType).Reverse()) | ||||
|         { | ||||
|             SystemConsole.WriteLine(); | ||||
|             SystemConsole.ForegroundColor = ConsoleColor.Yellow; | ||||
|             SystemConsole.WriteLine(group.Key.FullName); | ||||
|             SystemConsole.ResetColor(); | ||||
|  | ||||
|             foreach (var property in group) | ||||
|             { | ||||
|                 SystemConsole.WriteLine($"  {property.Name} = {property.GetValue(settings)}"); | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         if (context.Remaining.Raw.Count > 0) | ||||
|         { | ||||
|             SystemConsole.WriteLine(); | ||||
|             SystemConsole.ForegroundColor = ConsoleColor.Yellow; | ||||
|             SystemConsole.WriteLine("Remaining:"); | ||||
|             SystemConsole.ResetColor(); | ||||
|             SystemConsole.WriteLine(string.Join(", ", context.Remaining)); | ||||
|         } | ||||
|  | ||||
|         SystemConsole.WriteLine(); | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -4,7 +4,6 @@ public class CatCommand : AnimalCommand<CatSettings> | ||||
| { | ||||
|     public override int Execute(CommandContext context, CatSettings settings) | ||||
|     { | ||||
|         DumpSettings(context, settings); | ||||
|         return 0; | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -25,7 +25,6 @@ public class DogCommand : AnimalCommand<DogSettings> | ||||
|  | ||||
|     public override int Execute(CommandContext context, DogSettings settings) | ||||
|     { | ||||
|         DumpSettings(context, settings); | ||||
|         return 0; | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -5,7 +5,6 @@ public class HorseCommand : AnimalCommand<HorseSettings> | ||||
| { | ||||
|     public override int Execute(CommandContext context, HorseSettings settings) | ||||
|     { | ||||
|         DumpSettings(context, settings); | ||||
|         return 0; | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -5,7 +5,6 @@ public class TurtleCommand : AnimalCommand<TurtleSettings> | ||||
| { | ||||
|     public override int Execute(CommandContext context, TurtleSettings settings) | ||||
|     { | ||||
|         DumpSettings(context, settings); | ||||
|         return 0; | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| <Project Sdk="Microsoft.NET.Sdk"> | ||||
|  | ||||
|   <PropertyGroup> | ||||
|     <TargetFrameworks>net8.0;net7.0</TargetFrameworks> | ||||
|     <TargetFrameworks>net8.0;net7.0;net6.0</TargetFrameworks> | ||||
|   </PropertyGroup> | ||||
|  | ||||
|   <ItemGroup> | ||||
| @@ -9,15 +9,16 @@ | ||||
|   </ItemGroup> | ||||
|  | ||||
|   <ItemGroup> | ||||
|     <PackageReference Include="IsExternalInit" Version="1.0.2" PrivateAssets="all" /> | ||||
|     <PackageReference Include="IsExternalInit" Version="1.0.3" PrivateAssets="all" /> | ||||
|     <PackageReference Include="Microsoft.CodeAnalysis.CSharp.Analyzer.Testing.XUnit" Version="1.1.0" /> | ||||
|     <PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeFix.Testing.XUnit" Version="1.1.0" /> | ||||
|     <PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="2.6.1" /> | ||||
|     <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.0" /> | ||||
|     <PackageReference Include="Shouldly" Version="4.1.0" /> | ||||
|     <PackageReference Include="Spectre.Verify.Extensions" Version="18.0.0" /> | ||||
|     <PackageReference Include="xunit" Version="2.4.2" /> | ||||
|     <PackageReference Include="xunit.runner.visualstudio" Version="2.4.5"> | ||||
|     <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" /> | ||||
|     <PackageReference Include="Shouldly" Version="4.2.1" /> | ||||
|     <PackageReference Include="Spectre.Verify.Extensions" Version="22.3.1" /> | ||||
|     <PackageReference Include="Verify.Xunit" Version="23.0.1" /> | ||||
|     <PackageReference Include="xunit" Version="2.6.6" /> | ||||
|     <PackageReference Include="xunit.runner.visualstudio" Version="2.5.6"> | ||||
|       <PrivateAssets>all</PrivateAssets> | ||||
|       <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||||
|     </PackageReference> | ||||
|   | ||||
| @@ -3,7 +3,6 @@ namespace Spectre.Console.Tests.Unit.Cli.Annotations; | ||||
| [ExpectationPath("Arguments")] | ||||
| public sealed partial class CommandArgumentAttributeTests | ||||
| { | ||||
|     [UsesVerify] | ||||
|     public sealed class ArgumentCannotContainOptions | ||||
|     { | ||||
|         public sealed class Settings : CommandSettings | ||||
| @@ -24,7 +23,6 @@ public sealed partial class CommandArgumentAttributeTests | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     [UsesVerify] | ||||
|     public sealed class MultipleValuesAreNotSupported | ||||
|     { | ||||
|         public sealed class Settings : CommandSettings | ||||
| @@ -45,7 +43,6 @@ public sealed partial class CommandArgumentAttributeTests | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     [UsesVerify] | ||||
|     public sealed class ValuesMustHaveName | ||||
|     { | ||||
|         public sealed class Settings : CommandSettings | ||||
|   | ||||
| @@ -3,7 +3,6 @@ namespace Spectre.Console.Tests.Unit.Cli.Annotations; | ||||
| [ExpectationPath("Arguments")] | ||||
| public sealed partial class CommandOptionAttributeTests | ||||
| { | ||||
|     [UsesVerify] | ||||
|     public sealed class UnexpectedCharacter | ||||
|     { | ||||
|         public sealed class Settings : CommandSettings | ||||
| @@ -25,7 +24,6 @@ public sealed partial class CommandOptionAttributeTests | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     [UsesVerify] | ||||
|     public sealed class UnterminatedValueName | ||||
|     { | ||||
|         public sealed class Settings : CommandSettings | ||||
| @@ -47,7 +45,6 @@ public sealed partial class CommandOptionAttributeTests | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     [UsesVerify] | ||||
|     public sealed class OptionsMustHaveName | ||||
|     { | ||||
|         public sealed class Settings : CommandSettings | ||||
| @@ -69,7 +66,6 @@ public sealed partial class CommandOptionAttributeTests | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     [UsesVerify] | ||||
|     public sealed class OptionNamesCannotStartWithDigit | ||||
|     { | ||||
|         public sealed class Settings : CommandSettings | ||||
| @@ -91,7 +87,6 @@ public sealed partial class CommandOptionAttributeTests | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     [UsesVerify] | ||||
|     public sealed class InvalidCharacterInOptionName | ||||
|     { | ||||
|         public sealed class Settings : CommandSettings | ||||
| @@ -113,7 +108,6 @@ public sealed partial class CommandOptionAttributeTests | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     [UsesVerify] | ||||
|     public sealed class LongOptionMustHaveMoreThanOneCharacter | ||||
|     { | ||||
|         public sealed class Settings : CommandSettings | ||||
| @@ -135,7 +129,6 @@ public sealed partial class CommandOptionAttributeTests | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     [UsesVerify] | ||||
|     public sealed class ShortOptionMustOnlyBeOneCharacter | ||||
|     { | ||||
|         public sealed class Settings : CommandSettings | ||||
| @@ -157,7 +150,6 @@ public sealed partial class CommandOptionAttributeTests | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     [UsesVerify] | ||||
|     public sealed class MultipleOptionValuesAreNotSupported | ||||
|     { | ||||
|         public sealed class Settings : CommandSettings | ||||
| @@ -179,7 +171,6 @@ public sealed partial class CommandOptionAttributeTests | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     [UsesVerify] | ||||
|     public sealed class InvalidCharacterInValueName | ||||
|     { | ||||
|         public sealed class Settings : CommandSettings | ||||
| @@ -201,7 +192,6 @@ public sealed partial class CommandOptionAttributeTests | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     [UsesVerify] | ||||
|     public sealed class MissingLongAndShortName | ||||
|     { | ||||
|         public sealed class Settings : CommandSettings | ||||
|   | ||||
| @@ -4,7 +4,6 @@ namespace Spectre.Console.Tests.Unit.Cli; | ||||
|  | ||||
| public sealed partial class CommandAppTests | ||||
| { | ||||
|     [UsesVerify] | ||||
|     [ExpectationPath("Help")] | ||||
|     public class Help | ||||
|     { | ||||
|   | ||||
| @@ -2,11 +2,9 @@ namespace Spectre.Console.Tests.Unit.Cli; | ||||
|  | ||||
| public sealed partial class CommandAppTests | ||||
| { | ||||
|     [UsesVerify] | ||||
|     [ExpectationPath("Parsing")] | ||||
|     public sealed class Parsing | ||||
|     { | ||||
|         [UsesVerify] | ||||
|         [ExpectationPath("UnknownCommand")] | ||||
|         public sealed class UnknownCommand | ||||
|         { | ||||
| @@ -167,7 +165,6 @@ public sealed partial class CommandAppTests | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         [UsesVerify] | ||||
|         [ExpectationPath("CannotAssignValueToFlag")] | ||||
|         public sealed class CannotAssignValueToFlag | ||||
|         { | ||||
| @@ -208,7 +205,6 @@ public sealed partial class CommandAppTests | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         [UsesVerify] | ||||
|         [ExpectationPath("NoValueForOption")] | ||||
|         public sealed class NoValueForOption | ||||
|         { | ||||
| @@ -249,7 +245,6 @@ public sealed partial class CommandAppTests | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         [UsesVerify] | ||||
|         [ExpectationPath("NoMatchingArgument")] | ||||
|         public sealed class NoMatchingArgument | ||||
|         { | ||||
| @@ -272,7 +267,6 @@ public sealed partial class CommandAppTests | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         [UsesVerify] | ||||
|         [ExpectationPath("UnexpectedOption")] | ||||
|         public sealed class UnexpectedOption | ||||
|         { | ||||
| @@ -313,7 +307,6 @@ public sealed partial class CommandAppTests | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         [UsesVerify] | ||||
|         [ExpectationPath("UnknownOption")] | ||||
|         public sealed class UnknownOption | ||||
|         { | ||||
| @@ -356,7 +349,6 @@ public sealed partial class CommandAppTests | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         [UsesVerify] | ||||
|         [ExpectationPath("OptionWithoutName")] | ||||
|         public sealed class OptionWithoutName | ||||
|         { | ||||
| @@ -451,7 +443,6 @@ public sealed partial class CommandAppTests | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         [UsesVerify] | ||||
|         [ExpectationPath("InvalidShortOptionName")] | ||||
|         public sealed class InvalidShortOptionName | ||||
|         { | ||||
| @@ -474,7 +465,6 @@ public sealed partial class CommandAppTests | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         [UsesVerify] | ||||
|         [ExpectationPath("LongOptionNameIsOneCharacter")] | ||||
|         public sealed class LongOptionNameIsOneCharacter | ||||
|         { | ||||
| @@ -497,7 +487,6 @@ public sealed partial class CommandAppTests | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         [UsesVerify] | ||||
|         [ExpectationPath("LongOptionNameIsMissing")] | ||||
|         public sealed class LongOptionNameIsMissing | ||||
|         { | ||||
| @@ -520,7 +509,6 @@ public sealed partial class CommandAppTests | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         [UsesVerify] | ||||
|         [ExpectationPath("LongOptionNameStartWithDigit")] | ||||
|         public sealed class LongOptionNameStartWithDigit | ||||
|         { | ||||
| @@ -543,7 +531,6 @@ public sealed partial class CommandAppTests | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         [UsesVerify] | ||||
|         [ExpectationPath("LongOptionNameContainSymbol")] | ||||
|         public sealed class LongOptionNameContainSymbol | ||||
|         { | ||||
|   | ||||
| @@ -2,7 +2,6 @@ namespace Spectre.Console.Tests.Unit.Cli; | ||||
|  | ||||
| public sealed partial class CommandAppTests | ||||
| { | ||||
|     [UsesVerify] | ||||
|     [ExpectationPath("Xml")] | ||||
|     public sealed class Xml | ||||
|     { | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| <Project Sdk="Microsoft.NET.Sdk"> | ||||
|  | ||||
|   <PropertyGroup> | ||||
|     <TargetFrameworks>net8.0;net7.0</TargetFrameworks> | ||||
|     <TargetFrameworks>net8.0;net7.0;net6.0</TargetFrameworks> | ||||
|   </PropertyGroup> | ||||
|  | ||||
|   <ItemGroup> | ||||
| @@ -18,15 +18,15 @@ | ||||
|   </ItemGroup> | ||||
|  | ||||
|   <ItemGroup> | ||||
|     <PackageReference Include="IsExternalInit" Version="1.0.2" PrivateAssets="all" /> | ||||
|     <PackageReference Include="Microsoft.CodeAnalysis.CSharp.Analyzer.Testing.XUnit" Version="1.1.0" /> | ||||
|     <PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeFix.Testing.XUnit" Version="1.1.0" /> | ||||
|     <PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="2.6.1" /> | ||||
|     <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.0" /> | ||||
|     <PackageReference Include="Shouldly" Version="4.1.0" /> | ||||
|     <PackageReference Include="Spectre.Verify.Extensions" Version="18.0.0" /> | ||||
|     <PackageReference Include="xunit" Version="2.4.2" /> | ||||
|     <PackageReference Include="xunit.runner.visualstudio" Version="2.4.5"> | ||||
|     <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" /> | ||||
|     <PackageReference Include="Shouldly" Version="4.2.1" /> | ||||
|     <PackageReference Include="Spectre.Verify.Extensions" Version="22.3.1" /> | ||||
|     <PackageReference Include="Verify.Xunit" Version="23.0.1" /> | ||||
|     <PackageReference Include="xunit" Version="2.6.6" /> | ||||
|     <PackageReference Include="xunit.runner.visualstudio" Version="2.5.6"> | ||||
|       <PrivateAssets>all</PrivateAssets> | ||||
|       <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||||
|     </PackageReference> | ||||
|   | ||||
| @@ -1,6 +1,5 @@ | ||||
| namespace Spectre.Console.Tests.Unit; | ||||
|  | ||||
| [UsesVerify] | ||||
| [ExpectationPath("AlternateScreen")] | ||||
| public sealed class AlternateScreenTests | ||||
| { | ||||
|   | ||||
| @@ -1,6 +1,5 @@ | ||||
| namespace Spectre.Console.Tests.Unit; | ||||
|  | ||||
| [UsesVerify] | ||||
| [ExpectationPath("Exception")] | ||||
| public sealed class ExceptionTests | ||||
| { | ||||
|   | ||||
| @@ -1,6 +1,5 @@ | ||||
| namespace Spectre.Console.Tests.Unit; | ||||
|  | ||||
| [UsesVerify] | ||||
| [ExpectationPath("Live/Progress")] | ||||
| public sealed class ProgressTests | ||||
| { | ||||
|   | ||||
| @@ -1,6 +1,5 @@ | ||||
| namespace Spectre.Console.Tests.Unit; | ||||
|  | ||||
| [UsesVerify] | ||||
| [ExpectationPath("Live/Status")] | ||||
| public sealed class StatusTests | ||||
| { | ||||
|   | ||||
| @@ -1,6 +1,5 @@ | ||||
| namespace Spectre.Console.Tests.Unit; | ||||
|  | ||||
| [UsesVerify] | ||||
| [ExpectationPath("Prompts/Text")] | ||||
| public sealed class TextPromptTests | ||||
| { | ||||
|   | ||||
| @@ -1,6 +1,5 @@ | ||||
| namespace Spectre.Console.Tests.Unit; | ||||
|  | ||||
| [UsesVerify] | ||||
| [ExpectationPath("Widgets/Recorder")] | ||||
| public sealed class RecorderTests | ||||
| { | ||||
|   | ||||
| @@ -1,10 +1,8 @@ | ||||
| namespace Spectre.Console.Tests.Unit; | ||||
|  | ||||
| [UsesVerify] | ||||
| [ExpectationPath("Rendering/Borders/Box")] | ||||
| public sealed class BoxBorderTests | ||||
| { | ||||
|     [UsesVerify] | ||||
|     public sealed class NoBorder | ||||
|     { | ||||
|         public sealed class TheSafeGetBorderMethod | ||||
| @@ -52,7 +50,6 @@ public sealed class BoxBorderTests | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     [UsesVerify] | ||||
|     public sealed class AsciiBorder | ||||
|     { | ||||
|         public sealed class TheSafeGetBorderMethod | ||||
| @@ -84,7 +81,6 @@ public sealed class BoxBorderTests | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     [UsesVerify] | ||||
|     public sealed class DoubleBorder | ||||
|     { | ||||
|         public sealed class TheSafeGetBorderMethod | ||||
| @@ -116,7 +112,6 @@ public sealed class BoxBorderTests | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     [UsesVerify] | ||||
|     public sealed class HeavyBorder | ||||
|     { | ||||
|         public sealed class TheSafeGetBorderMethod | ||||
| @@ -148,7 +143,6 @@ public sealed class BoxBorderTests | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     [UsesVerify] | ||||
|     public sealed class RoundedBorder | ||||
|     { | ||||
|         [Fact] | ||||
| @@ -177,7 +171,6 @@ public sealed class BoxBorderTests | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     [UsesVerify] | ||||
|     public sealed class SquareBorder | ||||
|     { | ||||
|         [Fact] | ||||
|   | ||||
| @@ -1,10 +1,8 @@ | ||||
| namespace Spectre.Console.Tests.Unit; | ||||
|  | ||||
| [UsesVerify] | ||||
| [ExpectationPath("Rendering/Borders/Table")] | ||||
| public sealed class TableBorderTests | ||||
| { | ||||
|     [UsesVerify] | ||||
|     public sealed class NoBorder | ||||
|     { | ||||
|         [Fact] | ||||
| @@ -46,7 +44,6 @@ public sealed class TableBorderTests | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     [UsesVerify] | ||||
|     public sealed class AsciiBorder | ||||
|     { | ||||
|         [Fact] | ||||
| @@ -88,7 +85,6 @@ public sealed class TableBorderTests | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     [UsesVerify] | ||||
|     public sealed class Ascii2Border | ||||
|     { | ||||
|         [Fact] | ||||
| @@ -130,7 +126,6 @@ public sealed class TableBorderTests | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     [UsesVerify] | ||||
|     public sealed class AsciiDoubleHeadBorder | ||||
|     { | ||||
|         [Fact] | ||||
| @@ -172,7 +167,6 @@ public sealed class TableBorderTests | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     [UsesVerify] | ||||
|     public sealed class SquareBorder | ||||
|     { | ||||
|         [Fact] | ||||
| @@ -214,7 +208,6 @@ public sealed class TableBorderTests | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     [UsesVerify] | ||||
|     public sealed class RoundedBorder | ||||
|     { | ||||
|         [Fact] | ||||
| @@ -256,7 +249,6 @@ public sealed class TableBorderTests | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     [UsesVerify] | ||||
|     public sealed class MinimalBorder | ||||
|     { | ||||
|         [Fact] | ||||
| @@ -298,7 +290,6 @@ public sealed class TableBorderTests | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     [UsesVerify] | ||||
|     public sealed class MinimalHeavyHeadBorder | ||||
|     { | ||||
|         [Fact] | ||||
| @@ -340,7 +331,6 @@ public sealed class TableBorderTests | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     [UsesVerify] | ||||
|     public sealed class MinimalDoubleHeadBorder | ||||
|     { | ||||
|         [Fact] | ||||
| @@ -382,7 +372,6 @@ public sealed class TableBorderTests | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     [UsesVerify] | ||||
|     public sealed class SimpleBorder | ||||
|     { | ||||
|         [Fact] | ||||
| @@ -424,7 +413,6 @@ public sealed class TableBorderTests | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     [UsesVerify] | ||||
|     public sealed class HorizontalBorder | ||||
|     { | ||||
|         [Fact] | ||||
| @@ -466,7 +454,6 @@ public sealed class TableBorderTests | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     [UsesVerify] | ||||
|     public sealed class SimpleHeavyBorder | ||||
|     { | ||||
|         [Fact] | ||||
| @@ -508,7 +495,6 @@ public sealed class TableBorderTests | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     [UsesVerify] | ||||
|     public sealed class HeavyBorder | ||||
|     { | ||||
|         [Fact] | ||||
| @@ -550,7 +536,6 @@ public sealed class TableBorderTests | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     [UsesVerify] | ||||
|     public sealed class HeavyEdgeBorder | ||||
|     { | ||||
|         [Fact] | ||||
| @@ -592,7 +577,6 @@ public sealed class TableBorderTests | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     [UsesVerify] | ||||
|     public sealed class HeavyHeadBorder | ||||
|     { | ||||
|         [Fact] | ||||
| @@ -634,7 +618,6 @@ public sealed class TableBorderTests | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     [UsesVerify] | ||||
|     public sealed class DoubleBorder | ||||
|     { | ||||
|         [Fact] | ||||
| @@ -676,7 +659,6 @@ public sealed class TableBorderTests | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     [UsesVerify] | ||||
|     public sealed class DoubleEdgeBorder | ||||
|     { | ||||
|         [Fact] | ||||
| @@ -718,7 +700,6 @@ public sealed class TableBorderTests | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     [UsesVerify] | ||||
|     public sealed class MarkdownBorder | ||||
|     { | ||||
|         [Fact] | ||||
|   | ||||
| @@ -2,7 +2,6 @@ namespace Spectre.Console.Tests.Unit; | ||||
|  | ||||
| public sealed class SegmentTests | ||||
| { | ||||
|     [UsesVerify] | ||||
|     public sealed class TheSplitMethod | ||||
|     { | ||||
|         [Theory] | ||||
| @@ -44,7 +43,6 @@ public sealed class SegmentTests | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     [UsesVerify] | ||||
|     public sealed class TheSplitLinesMethod | ||||
|     { | ||||
|         [Fact] | ||||
|   | ||||
| @@ -2,11 +2,9 @@ using Spectre.Console.Extensions; | ||||
|  | ||||
| namespace Spectre.Console.Tests.Unit; | ||||
|  | ||||
| [UsesVerify] | ||||
| [ExpectationPath("Widgets/Align")] | ||||
| public sealed class AlignTests | ||||
| { | ||||
|     [UsesVerify] | ||||
|     public sealed class Left | ||||
|     { | ||||
|         [Fact] | ||||
| @@ -55,7 +53,6 @@ public sealed class AlignTests | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     [UsesVerify] | ||||
|     public sealed class Center | ||||
|     { | ||||
|         [Fact] | ||||
| @@ -104,7 +101,6 @@ public sealed class AlignTests | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     [UsesVerify] | ||||
|     public sealed class Right | ||||
|     { | ||||
|         [Fact] | ||||
|   | ||||
| @@ -1,6 +1,5 @@ | ||||
| namespace Spectre.Console.Tests.Unit; | ||||
|  | ||||
| [UsesVerify] | ||||
| [ExpectationPath("Widgets/BarChart")] | ||||
| public sealed class BarChartTests | ||||
| { | ||||
|   | ||||
| @@ -1,6 +1,5 @@ | ||||
| namespace Spectre.Console.Tests.Unit; | ||||
|  | ||||
| [UsesVerify] | ||||
| [ExpectationPath("Widgets/BreakdownChart")] | ||||
| public sealed class BreakdownChartTests | ||||
| { | ||||
|   | ||||
| @@ -1,6 +1,5 @@ | ||||
| namespace Spectre.Console.Tests.Unit; | ||||
|  | ||||
| [UsesVerify] | ||||
| [ExpectationPath("Widgets/Calendar")] | ||||
| public sealed class CalendarTests | ||||
| { | ||||
|   | ||||
| @@ -1,6 +1,5 @@ | ||||
| namespace Spectre.Console.Tests.Unit; | ||||
|  | ||||
| [UsesVerify] | ||||
| [ExpectationPath("Widgets/Canvas")] | ||||
| public class CanvasTests | ||||
| { | ||||
|   | ||||
| @@ -1,6 +1,5 @@ | ||||
| namespace Spectre.Console.Tests.Unit; | ||||
|  | ||||
| [UsesVerify] | ||||
| [ExpectationPath("Widgets/Columns")] | ||||
| public sealed class ColumnsTests | ||||
| { | ||||
|   | ||||
| @@ -1,6 +1,5 @@ | ||||
| namespace Spectre.Console.Tests.Unit; | ||||
|  | ||||
| [UsesVerify] | ||||
| [ExpectationPath("Widgets/Figlet")] | ||||
| public sealed class FigletTests | ||||
| { | ||||
|   | ||||
| @@ -1,6 +1,5 @@ | ||||
| namespace Spectre.Console.Tests.Unit; | ||||
|  | ||||
| [UsesVerify] | ||||
| [ExpectationPath("Widgets/Grid")] | ||||
| public sealed class GridTests | ||||
| { | ||||
| @@ -70,7 +69,6 @@ public sealed class GridTests | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     [UsesVerify] | ||||
|     [ExpectationPath("AddEmptyRow")] | ||||
|     public sealed class TheAddEmptyRowMethod | ||||
|     { | ||||
|   | ||||
| @@ -1,6 +1,5 @@ | ||||
| namespace Spectre.Console.Tests.Unit; | ||||
|  | ||||
| [UsesVerify] | ||||
| [ExpectationPath("Widgets/Json")] | ||||
| public sealed class JsonTextTests | ||||
| { | ||||
|   | ||||
| @@ -1,6 +1,5 @@ | ||||
| namespace Spectre.Console.Tests.Unit; | ||||
|  | ||||
| [UsesVerify] | ||||
| [ExpectationPath("Widgets/Layout")] | ||||
| public sealed class LayoutTests | ||||
| { | ||||
|   | ||||
| @@ -1,6 +1,5 @@ | ||||
| namespace Spectre.Console.Tests.Unit; | ||||
|  | ||||
| [UsesVerify] | ||||
| [ExpectationPath("Widgets/Padder")] | ||||
| public sealed class PadderTests | ||||
| { | ||||
|   | ||||
| @@ -1,6 +1,5 @@ | ||||
| namespace Spectre.Console.Tests.Unit; | ||||
|  | ||||
| [UsesVerify] | ||||
| [ExpectationPath("Widgets/Panel")] | ||||
| public sealed class PanelTests | ||||
| { | ||||
|   | ||||
| @@ -1,6 +1,5 @@ | ||||
| namespace Spectre.Console.Tests.Unit; | ||||
|  | ||||
| [UsesVerify] | ||||
| [ExpectationPath("Widgets/Rows")] | ||||
| public sealed class RowsTests | ||||
| { | ||||
|   | ||||
| @@ -1,6 +1,5 @@ | ||||
| namespace Spectre.Console.Tests.Unit; | ||||
|  | ||||
| [UsesVerify] | ||||
| [ExpectationPath("Widgets/Rule")] | ||||
| public sealed class RuleTests | ||||
| { | ||||
|   | ||||
| @@ -1,10 +1,8 @@ | ||||
| namespace Spectre.Console.Tests.Unit; | ||||
|  | ||||
| [UsesVerify] | ||||
| [ExpectationPath("Widgets/Table/Rows/Extensions")] | ||||
| public sealed class TableRowCollectionExtensionsTests | ||||
| { | ||||
|     [UsesVerify] | ||||
|     public sealed class TheAddRowMethod | ||||
|     { | ||||
|         [Fact] | ||||
| @@ -48,7 +46,6 @@ public sealed class TableRowCollectionExtensionsTests | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     [UsesVerify] | ||||
|     public sealed class TheInsertRowMethod | ||||
|     { | ||||
|         [Fact] | ||||
| @@ -92,7 +89,6 @@ public sealed class TableRowCollectionExtensionsTests | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     [UsesVerify] | ||||
|     public sealed class TheRemoveRowMethod | ||||
|     { | ||||
|         [Fact] | ||||
|   | ||||
| @@ -3,7 +3,6 @@ namespace Spectre.Console.Tests.Unit; | ||||
| [ExpectationPath("Widgets/Table/Rows")] | ||||
| public sealed class TableRowCollectionTests | ||||
| { | ||||
|     [UsesVerify] | ||||
|     public sealed class TheAddMethod | ||||
|     { | ||||
|         [Fact] | ||||
| @@ -69,7 +68,6 @@ public sealed class TableRowCollectionTests | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     [UsesVerify] | ||||
|     public sealed class TheInsertMethod | ||||
|     { | ||||
|         [Fact] | ||||
| @@ -137,7 +135,6 @@ public sealed class TableRowCollectionTests | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     [UsesVerify] | ||||
|     public sealed class TheRemoveMethod | ||||
|     { | ||||
|         [Fact] | ||||
| @@ -215,7 +212,6 @@ public sealed class TableRowCollectionTests | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     [UsesVerify] | ||||
|     public sealed class TheUpdateMethod | ||||
|     { | ||||
|         [Fact] | ||||
|   | ||||
| @@ -1,6 +1,5 @@ | ||||
| namespace Spectre.Console.Tests.Unit; | ||||
|  | ||||
| [UsesVerify] | ||||
| [ExpectationPath("Widgets/Table")] | ||||
| public sealed class TableTests | ||||
| { | ||||
| @@ -101,7 +100,6 @@ public sealed class TableTests | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     [UsesVerify] | ||||
|     public sealed class TheAddEmptyRowMethod | ||||
|     { | ||||
|         [Fact] | ||||
|   | ||||
| @@ -1,6 +1,5 @@ | ||||
| namespace Spectre.Console.Tests.Unit; | ||||
|  | ||||
| [UsesVerify] | ||||
| [ExpectationPath("Widgets/TextPath")] | ||||
| public sealed class TextPathTests | ||||
| { | ||||
|   | ||||
| @@ -1,6 +1,5 @@ | ||||
| namespace Spectre.Console.Tests.Unit; | ||||
|  | ||||
| [UsesVerify] | ||||
| [ExpectationPath("Widgets/Tree")] | ||||
| public class TreeTests | ||||
| { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user