Skip to content

Commit

Permalink
Use known categories instead of string literals (#442)
Browse files Browse the repository at this point in the history
  • Loading branch information
hartez authored Mar 7, 2021
1 parent 36b420a commit a08fcde
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace Microsoft.Maui.DeviceTests
{
[Category("ButtonHandler")]
[Category(TestCategory.Button)]
public partial class ButtonHandlerTests : HandlerTestBase<ButtonHandler>
{
public ButtonHandlerTests(HandlerTestFixture fixture) : base(fixture)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace Microsoft.Maui.DeviceTests
{
[Category("EntryHandler")]
[Category(TestCategory.Entry)]
public partial class EntryHandlerTests : HandlerTestBase<EntryHandler>
{
public EntryHandlerTests(HandlerTestFixture fixture) : base(fixture)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace Microsoft.Maui.DeviceTests
{
[Category("LabelHandler")]
[Category(TestCategory.Label)]
public partial class LabelHandlerTests : HandlerTestBase<LabelHandler>
{
public LabelHandlerTests(HandlerTestFixture fixture) : base(fixture)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace Microsoft.Maui.DeviceTests.Handlers.Layout
{
[Category("LayoutHandler")]
[Category(TestCategory.Layout)]
public partial class LayoutHandlerTests : HandlerTestBase<LayoutHandler>
{
public LayoutHandlerTests(HandlerTestFixture fixture) : base(fixture)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace Microsoft.Maui.DeviceTests
{
[Category("SliderHandler")]
[Category(TestCategory.Slider)]
public partial class SliderHandlerTests : HandlerTestBase<SliderHandler>
{
public SliderHandlerTests(HandlerTestFixture fixture) : base(fixture)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace Microsoft.Maui.DeviceTests
{
[Category("SwitchHandler")]
[Category(TestCategory.Switch)]
public partial class SwitchHandlerTests : HandlerTestBase<SwitchHandler>
{
public SwitchHandlerTests(HandlerTestFixture fixture) : base(fixture)
Expand Down
4 changes: 4 additions & 0 deletions src/Core/tests/DeviceTests/TestCategory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}
}

0 comments on commit a08fcde

Please sign in to comment.