mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-26 15:57:56 +01:00
* Refactored test namespaces. Moved some tests that were in wrong project. Code cleanup * Parrallel -> Parallel
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System.Text;
|
||||
using Xunit.Abstractions;
|
||||
|
||||
namespace Terminal.Gui.DrawingTests;
|
||||
namespace UnitTests_Parallelizable.DrawingTests;
|
||||
|
||||
public class CellTests ()
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#nullable enable
|
||||
|
||||
namespace Terminal.Gui.DrawingTests;
|
||||
namespace UnitTests_Parallelizable.DrawingTests;
|
||||
|
||||
public class AnsiColorNameResolverTests
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Xunit;
|
||||
|
||||
namespace Terminal.Gui.DrawingTests;
|
||||
namespace UnitTests_Parallelizable.DrawingTests;
|
||||
|
||||
public class ColorStandardColorTests
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
using Xunit.Abstractions;
|
||||
|
||||
namespace Terminal.Gui.DrawingTests;
|
||||
namespace UnitTests_Parallelizable.DrawingTests;
|
||||
|
||||
public class StandardColorNameResolverTests (ITestOutputHelper output)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Terminal.Gui.DrawingTests;
|
||||
namespace UnitTests_Parallelizable.DrawingTests;
|
||||
|
||||
public partial class ColorTests
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System.Numerics;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Terminal.Gui.DrawingTests;
|
||||
namespace UnitTests_Parallelizable.DrawingTests;
|
||||
|
||||
public partial class ColorTests
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
using System.Buffers.Binary;
|
||||
using System.Globalization;
|
||||
|
||||
namespace Terminal.Gui.DrawingTests;
|
||||
namespace UnitTests_Parallelizable.DrawingTests;
|
||||
|
||||
public partial class ColorTests
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System.Numerics;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Terminal.Gui.DrawingTests;
|
||||
namespace UnitTests_Parallelizable.DrawingTests;
|
||||
|
||||
public partial class ColorTests
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#nullable enable
|
||||
|
||||
namespace Terminal.Gui.DrawingTests;
|
||||
namespace UnitTests_Parallelizable.DrawingTests;
|
||||
|
||||
public partial class ColorTests
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Terminal.Gui.DrawingTests;
|
||||
namespace UnitTests_Parallelizable.DrawingTests;
|
||||
|
||||
public class DrawContextTests
|
||||
{
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Terminal.Gui.DrawingTests;
|
||||
namespace UnitTests_Parallelizable.DrawingTests;
|
||||
|
||||
public class GradientFillTests
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Terminal.Gui.DrawingTests;
|
||||
namespace UnitTests_Parallelizable.DrawingTests;
|
||||
|
||||
public class GradientTests
|
||||
{
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Terminal.Gui.DrawingTests;
|
||||
namespace UnitTests_Parallelizable.DrawingTests;
|
||||
|
||||
public class PopularityPaletteWithThresholdTests
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Xunit.Sdk;
|
||||
|
||||
namespace Terminal.Gui.DrawingTests;
|
||||
namespace UnitTests_Parallelizable.DrawingTests;
|
||||
|
||||
public class DifferenceTests
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Terminal.Gui.DrawingTests;
|
||||
namespace UnitTests_Parallelizable.DrawingTests;
|
||||
|
||||
|
||||
public class MergeRectanglesTests
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Terminal.Gui.DrawingTests;
|
||||
namespace UnitTests_Parallelizable.DrawingTests;
|
||||
|
||||
public class RegionTests
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Terminal.Gui.DrawingTests;
|
||||
namespace UnitTests_Parallelizable.DrawingTests;
|
||||
|
||||
using Xunit;
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Xunit;
|
||||
|
||||
namespace Terminal.Gui.DrawingTests;
|
||||
namespace UnitTests_Parallelizable.DrawingTests;
|
||||
|
||||
public class SchemeGetAttributeForRoleAlgorithmTests
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#nullable enable
|
||||
using System.Reflection;
|
||||
|
||||
namespace Terminal.Gui.DrawingTests;
|
||||
namespace UnitTests_Parallelizable.DrawingTests;
|
||||
|
||||
public class SchemeTests
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
namespace Terminal.Gui.DrawingTests;
|
||||
namespace UnitTests_Parallelizable.DrawingTests;
|
||||
|
||||
public class SixelEncoderTests
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Terminal.Gui.DrawingTests;
|
||||
namespace UnitTests_Parallelizable.DrawingTests;
|
||||
|
||||
public class SolidFillTests
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Xunit.Abstractions;
|
||||
|
||||
namespace Terminal.Gui.DrawingTests;
|
||||
namespace UnitTests_Parallelizable.DrawingTests;
|
||||
|
||||
public class StraightLineTests (ITestOutputHelper output)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Terminal.Gui.DrawingTests;
|
||||
namespace UnitTests_Parallelizable.DrawingTests;
|
||||
|
||||
public class ThicknessTests
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user