From a08fcdedbe69da89cfeb36408e7bbbe55b3a2e5b Mon Sep 17 00:00:00 2001 From: "E.Z. Hart" Date: Sat, 6 Mar 2021 21:34:44 -0700 Subject: [PATCH] Use known categories instead of string literals (#442) --- .../tests/DeviceTests/Handlers/Button/ButtonHandlerTests.cs | 2 +- .../tests/DeviceTests/Handlers/Entry/EntryHandlerTests.cs | 2 +- .../tests/DeviceTests/Handlers/Label/LabelHandlerTests.cs | 2 +- .../tests/DeviceTests/Handlers/Layout/LayoutHandlerTests.cs | 2 +- .../tests/DeviceTests/Handlers/Slider/SliderHandlerTests.cs | 2 +- .../tests/DeviceTests/Handlers/Switch/SwitchHandlerTests.cs | 2 +- src/Core/tests/DeviceTests/TestCategory.cs | 4 ++++ 7 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/Core/tests/DeviceTests/Handlers/Button/ButtonHandlerTests.cs b/src/Core/tests/DeviceTests/Handlers/Button/ButtonHandlerTests.cs index 58983d1102d7..c612ec9be23f 100644 --- a/src/Core/tests/DeviceTests/Handlers/Button/ButtonHandlerTests.cs +++ b/src/Core/tests/DeviceTests/Handlers/Button/ButtonHandlerTests.cs @@ -5,7 +5,7 @@ namespace Microsoft.Maui.DeviceTests { - [Category("ButtonHandler")] + [Category(TestCategory.Button)] public partial class ButtonHandlerTests : HandlerTestBase { public ButtonHandlerTests(HandlerTestFixture fixture) : base(fixture) diff --git a/src/Core/tests/DeviceTests/Handlers/Entry/EntryHandlerTests.cs b/src/Core/tests/DeviceTests/Handlers/Entry/EntryHandlerTests.cs index 61e19309b936..c30401116545 100644 --- a/src/Core/tests/DeviceTests/Handlers/Entry/EntryHandlerTests.cs +++ b/src/Core/tests/DeviceTests/Handlers/Entry/EntryHandlerTests.cs @@ -5,7 +5,7 @@ namespace Microsoft.Maui.DeviceTests { - [Category("EntryHandler")] + [Category(TestCategory.Entry)] public partial class EntryHandlerTests : HandlerTestBase { public EntryHandlerTests(HandlerTestFixture fixture) : base(fixture) diff --git a/src/Core/tests/DeviceTests/Handlers/Label/LabelHandlerTests.cs b/src/Core/tests/DeviceTests/Handlers/Label/LabelHandlerTests.cs index 975f8be5f5e0..62c10afaf468 100644 --- a/src/Core/tests/DeviceTests/Handlers/Label/LabelHandlerTests.cs +++ b/src/Core/tests/DeviceTests/Handlers/Label/LabelHandlerTests.cs @@ -5,7 +5,7 @@ namespace Microsoft.Maui.DeviceTests { - [Category("LabelHandler")] + [Category(TestCategory.Label)] public partial class LabelHandlerTests : HandlerTestBase { public LabelHandlerTests(HandlerTestFixture fixture) : base(fixture) diff --git a/src/Core/tests/DeviceTests/Handlers/Layout/LayoutHandlerTests.cs b/src/Core/tests/DeviceTests/Handlers/Layout/LayoutHandlerTests.cs index 1ebab6affb39..6eab4200fb44 100644 --- a/src/Core/tests/DeviceTests/Handlers/Layout/LayoutHandlerTests.cs +++ b/src/Core/tests/DeviceTests/Handlers/Layout/LayoutHandlerTests.cs @@ -5,7 +5,7 @@ namespace Microsoft.Maui.DeviceTests.Handlers.Layout { - [Category("LayoutHandler")] + [Category(TestCategory.Layout)] public partial class LayoutHandlerTests : HandlerTestBase { public LayoutHandlerTests(HandlerTestFixture fixture) : base(fixture) diff --git a/src/Core/tests/DeviceTests/Handlers/Slider/SliderHandlerTests.cs b/src/Core/tests/DeviceTests/Handlers/Slider/SliderHandlerTests.cs index 6c3c460edc02..fdbeda6736ea 100644 --- a/src/Core/tests/DeviceTests/Handlers/Slider/SliderHandlerTests.cs +++ b/src/Core/tests/DeviceTests/Handlers/Slider/SliderHandlerTests.cs @@ -6,7 +6,7 @@ namespace Microsoft.Maui.DeviceTests { - [Category("SliderHandler")] + [Category(TestCategory.Slider)] public partial class SliderHandlerTests : HandlerTestBase { public SliderHandlerTests(HandlerTestFixture fixture) : base(fixture) diff --git a/src/Core/tests/DeviceTests/Handlers/Switch/SwitchHandlerTests.cs b/src/Core/tests/DeviceTests/Handlers/Switch/SwitchHandlerTests.cs index 7129a6587a00..a57a729c2955 100644 --- a/src/Core/tests/DeviceTests/Handlers/Switch/SwitchHandlerTests.cs +++ b/src/Core/tests/DeviceTests/Handlers/Switch/SwitchHandlerTests.cs @@ -5,7 +5,7 @@ namespace Microsoft.Maui.DeviceTests { - [Category("SwitchHandler")] + [Category(TestCategory.Switch)] public partial class SwitchHandlerTests : HandlerTestBase { public SwitchHandlerTests(HandlerTestFixture fixture) : base(fixture) diff --git a/src/Core/tests/DeviceTests/TestCategory.cs b/src/Core/tests/DeviceTests/TestCategory.cs index 446c1349743c..5f5fbf047560 100644 --- a/src/Core/tests/DeviceTests/TestCategory.cs +++ b/src/Core/tests/DeviceTests/TestCategory.cs @@ -2,7 +2,11 @@ { public static class TestCategory { + public const string Button = "Button"; + public const string Entry = "Entry"; + public const string Label = "Label"; public const string Slider = "Slider"; public const string Switch = "Switch"; + public const string Layout = "Layout"; } }