Skip to content

Commit 954adae

Browse files
devleadJericho
andcommitted
(GH-4642) Standardize execution status display in report printers
- Introduce ToReportStatus() extension method to standardize execution status display across both report printers, ensuring consistent formatting ("Succeeded", "Skipped", "Failed") instead of using enum ToString() directly. - Add null argument validation to CakeSpectreReportPrinter and CakeReportPrinter constructors for improved defensive programming. - Update CakeSpectreReportPrinter and CakeReportPrinter to use the new extension method for status formatting. - Add test coverage for both printers including verbosity-based output verification. - fixes #4642 - Fix typo Co-authored-by: Jericho <[email protected]>
1 parent 2276633 commit 954adae

File tree

46 files changed

+636
-3
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+636
-3
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<PropertyGroup>
3+
<AssemblyName>Cake.Cli.Tests</AssemblyName>
4+
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
5+
<IsCakeTestProject>true</IsCakeTestProject>
6+
<ImplicitUsings>enable</ImplicitUsings>
7+
</PropertyGroup>
8+
<!-- Import shared functionality -->
9+
<Import Project="..\Shared.msbuild" />
10+
<!-- Project references -->
11+
<ItemGroup>
12+
<ProjectReference Include="..\Cake.Cli\Cake.Cli.csproj" />
13+
<ProjectReference Include="..\Cake.Core\Cake.Core.csproj" />
14+
<ProjectReference Include="..\Cake.Testing\Cake.Testing.csproj" />
15+
<ProjectReference Include="..\Cake.Testing.Xunit.v3\Cake.Testing.Xunit.v3.csproj" />
16+
</ItemGroup>
17+
<!-- Global packages -->
18+
<ItemGroup>
19+
<PackageReference Include="Microsoft.NET.Test.Sdk" />
20+
<PackageReference Include="Spectre.Verify.Extensions" />
21+
<PackageReference Include="Spectre.Console.Testing" />
22+
<PackageReference Include="Verify.DiffPlex" />
23+
<PackageReference Include="Verify.XunitV3" />
24+
<PackageReference Include="xunit.v3" />
25+
<PackageReference Include="xunit.runner.visualstudio">
26+
<PrivateAssets>all</PrivateAssets>
27+
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
28+
</PackageReference>
29+
<PackageReference Include="NSubstitute" />
30+
<PackageReference Include="Castle.Core" />
31+
<PackageReference Include="Microsoft.Extensions.TimeProvider.Testing" />
32+
</ItemGroup>
33+
<ItemGroup>
34+
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
35+
</ItemGroup>
36+
<ItemGroup>
37+
<Folder Include="Expectations\" />
38+
</ItemGroup>
39+
</Project>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+

2+
────────────────────────────────────────────────────────────────────────────────
3+
Setup
4+
────────────────────────────────────────────────────────────────────────────────
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
emptyString
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+

2+
────────────────────────────────────────────────────────────────────────────────
3+
Setup
4+
────────────────────────────────────────────────────────────────────────────────
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
emptyString
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+

2+
────────────────────────────────────────────────────────────────────────────────
3+
Setup
4+
────────────────────────────────────────────────────────────────────────────────
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+

2+
════════════════════════════════════════════════════════════════════════════════
3+
Skipped Step
4+
════════════════════════════════════════════════════════════════════════════════
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
emptyString
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
emptyString
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
emptyString

0 commit comments

Comments
 (0)