Fixes #4298 - Updates test namespaces (#4299)

* Refactored test namespaces.
Moved some tests that were in wrong project.
Code cleanup

* Parrallel -> Parallel
This commit is contained in:
Tig
2025-10-20 14:14:38 -06:00
committed by GitHub
parent 041e9de70e
commit fdeaa8331b
280 changed files with 328 additions and 323 deletions

View File

@@ -2,7 +2,7 @@ using System.Text;
using System.Text.Json;
using Xunit.Abstractions;
namespace Terminal.Gui.DrawingTests;
namespace UnitTests_Parallelizable.DrawingTests;
public class AlignerTests (ITestOutputHelper output)
{

View File

@@ -1,6 +1,6 @@
// Alias Console to MockConsole so we don't accidentally use Console
namespace Terminal.Gui.DrawingTests;
namespace UnitTests_Parallelizable.DrawingTests;
public class AttributeTests
{

View File

@@ -1,7 +1,7 @@
using System.Text;
using Xunit.Abstractions;
namespace Terminal.Gui.DrawingTests;
namespace UnitTests_Parallelizable.DrawingTests;
public class CellTests ()
{

View File

@@ -1,6 +1,6 @@
#nullable enable
namespace Terminal.Gui.DrawingTests;
namespace UnitTests_Parallelizable.DrawingTests;
public class AnsiColorNameResolverTests
{

View File

@@ -1,6 +1,6 @@
using Xunit;
namespace Terminal.Gui.DrawingTests;
namespace UnitTests_Parallelizable.DrawingTests;
public class ColorStandardColorTests
{

View File

@@ -2,8 +2,9 @@
using System.Collections.Generic;
using Xunit.Abstractions;
using Terminal.Gui;
namespace Terminal.Gui.DrawingTests;
namespace UnitTests_Parallelizable.DrawingTests;
public class MultiStandardColorNameResolverTests (ITestOutputHelper output)
{
@@ -21,7 +22,7 @@ public class MultiStandardColorNameResolverTests (ITestOutputHelper output)
Assert.True (parsed, $"TryParseColor should succeed for {name}");
Color expectedColor = new (Drawing.StandardColors.GetArgb (standardColor));
Color expectedColor = new (Terminal.Gui.Drawing.StandardColors.GetArgb (standardColor));
Assert.Equal (expectedColor.R, actualColor.R);
Assert.Equal (expectedColor.G, actualColor.G);
@@ -32,7 +33,7 @@ public class MultiStandardColorNameResolverTests (ITestOutputHelper output)
[MemberData (nameof (StandardColors))]
public void TryNameColor_ResolvesAllStandardColors (StandardColor standardColor)
{
Color color = new (Drawing.StandardColors.GetArgb (standardColor));
Color color = new (Terminal.Gui.Drawing.StandardColors.GetArgb (standardColor));
bool success = _candidate.TryNameColor (color, out string? resolvedName);
@@ -44,7 +45,7 @@ public class MultiStandardColorNameResolverTests (ITestOutputHelper output)
Assert.True (success, $"TryNameColor should succeed for {standardColor}");
List<string> expectedNames = Enum.GetNames<StandardColor> ()
.Where (name => Drawing.StandardColors.GetArgb (Enum.Parse<StandardColor> (name)) == color.Argb)
.Where (name => Terminal.Gui.Drawing.StandardColors.GetArgb (Enum.Parse<StandardColor> (name)) == color.Argb)
.ToList ();
Assert.Contains (resolvedName, expectedNames);
@@ -57,7 +58,7 @@ public class MultiStandardColorNameResolverTests (ITestOutputHelper output)
foreach (StandardColor sc in Enum.GetValues<StandardColor> ())
{
Color color = new (Drawing.StandardColors.GetArgb (sc));
Color color = new (Terminal.Gui.Drawing.StandardColors.GetArgb (sc));
if (!_candidate.TryNameColor (color, out _))
{
unmapped.Add (sc);

View File

@@ -2,7 +2,7 @@
using Xunit.Abstractions;
namespace Terminal.Gui.DrawingTests;
namespace UnitTests_Parallelizable.DrawingTests;
public class StandardColorNameResolverTests (ITestOutputHelper output)
{

View File

@@ -1,4 +1,4 @@
namespace Terminal.Gui.DrawingTests;
namespace UnitTests_Parallelizable.DrawingTests;
public partial class ColorTests
{

View File

@@ -1,7 +1,7 @@
using System.Numerics;
using System.Reflection;
namespace Terminal.Gui.DrawingTests;
namespace UnitTests_Parallelizable.DrawingTests;
public partial class ColorTests
{

View File

@@ -2,7 +2,7 @@
using System.Buffers.Binary;
using System.Globalization;
namespace Terminal.Gui.DrawingTests;
namespace UnitTests_Parallelizable.DrawingTests;
public partial class ColorTests
{

View File

@@ -1,7 +1,7 @@
using System.Numerics;
using System.Runtime.CompilerServices;
namespace Terminal.Gui.DrawingTests;
namespace UnitTests_Parallelizable.DrawingTests;
public partial class ColorTests
{

View File

@@ -1,6 +1,6 @@
#nullable enable
namespace Terminal.Gui.DrawingTests;
namespace UnitTests_Parallelizable.DrawingTests;
public partial class ColorTests
{

View File

@@ -1,4 +1,4 @@
namespace Terminal.Gui.DrawingTests;
namespace UnitTests_Parallelizable.DrawingTests;
public class DrawContextTests
{

View File

@@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Terminal.Gui.DrawingTests;
namespace UnitTests_Parallelizable.DrawingTests;
public class FillPairTests
{

View File

@@ -1,4 +1,4 @@
namespace Terminal.Gui.DrawingTests;
namespace UnitTests_Parallelizable.DrawingTests;
public class GradientFillTests
{

View File

@@ -1,4 +1,4 @@
namespace Terminal.Gui.DrawingTests;
namespace UnitTests_Parallelizable.DrawingTests;
public class GradientTests
{

View File

@@ -1,4 +1,4 @@
namespace Terminal.Gui.DrawingTests;
namespace UnitTests_Parallelizable.DrawingTests;
/// <summary>
/// Pure unit tests for <see cref="LineCanvas"/> that don't require Application.Driver or View context.

View File

@@ -1,4 +1,4 @@
namespace Terminal.Gui.DrawingTests;
namespace UnitTests_Parallelizable.DrawingTests;
public class PopularityPaletteWithThresholdTests
{

View File

@@ -1,6 +1,6 @@
using Xunit.Sdk;
namespace Terminal.Gui.DrawingTests;
namespace UnitTests_Parallelizable.DrawingTests;
public class DifferenceTests
{

View File

@@ -1,4 +1,4 @@
namespace Terminal.Gui.DrawingTests;
namespace UnitTests_Parallelizable.DrawingTests;
public class MergeRectanglesTests

View File

@@ -1,4 +1,4 @@
namespace Terminal.Gui.DrawingTests;
namespace UnitTests_Parallelizable.DrawingTests;
public class RegionTests
{

View File

@@ -1,4 +1,4 @@
namespace Terminal.Gui.DrawingTests;
namespace UnitTests_Parallelizable.DrawingTests;
using Xunit;

View File

@@ -1,4 +1,4 @@
namespace Terminal.Gui.DrawingTests;
namespace UnitTests_Parallelizable.DrawingTests;
/// <summary>
/// Pure unit tests for <see cref="Ruler"/> that don't require Application.Driver or View context.

View File

@@ -1,6 +1,6 @@
using Xunit;
namespace Terminal.Gui.DrawingTests;
namespace UnitTests_Parallelizable.DrawingTests;
public class SchemeGetAttributeForRoleAlgorithmTests
{

View File

@@ -1,7 +1,7 @@
#nullable enable
using System.Reflection;
namespace Terminal.Gui.DrawingTests;
namespace UnitTests_Parallelizable.DrawingTests;
public class SchemeTests
{

View File

@@ -1,5 +1,5 @@

namespace Terminal.Gui.DrawingTests;
namespace UnitTests_Parallelizable.DrawingTests;
public class SixelEncoderTests
{

View File

@@ -1,4 +1,4 @@
namespace Terminal.Gui.DrawingTests;
namespace UnitTests_Parallelizable.DrawingTests;
public class SolidFillTests
{

View File

@@ -1,6 +1,6 @@
using Xunit.Abstractions;
namespace Terminal.Gui.DrawingTests;
namespace UnitTests_Parallelizable.DrawingTests;
public class StraightLineTests (ITestOutputHelper output)
{

View File

@@ -1,4 +1,4 @@
namespace Terminal.Gui.DrawingTests;
namespace UnitTests_Parallelizable.DrawingTests;
public class ThicknessTests
{