Skip to content

Commit 24de644

Browse files
committed
fix codes
1 parent f2cb2c8 commit 24de644

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/TestUtils/src/DeviceTests.Analyzers/XUnitTestMissingCategoryAnalyzer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ namespace DeviceTests.Analyzers
1111
[DiagnosticAnalyzer(LanguageNames.CSharp)]
1212
public class XUnitTestMissingCategoryAnalyzer : DiagnosticAnalyzer
1313
{
14-
public const string DiagnosticId = "MAUI1002";
14+
public const string DiagnosticId = "MAUIT1001";
1515

1616
const string Title = "Test methods should have a Category";
1717
const string MessageFormat = "Test method '{0}' should be marked with a `[Category]` attribute on the method or its parent class";
@@ -24,7 +24,7 @@ public class XUnitTestMissingCategoryAnalyzer : DiagnosticAnalyzer
2424
Title,
2525
MessageFormat,
2626
Category,
27-
DiagnosticSeverity.Warning,
27+
DiagnosticSeverity.Error,
2828
isEnabledByDefault: true,
2929
description: Description);
3030

src/TestUtils/src/DeviceTests.Analyzers/XUnitTestMultipleCategoriesAnalyzer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace DeviceTests.Analyzers
1212
[DiagnosticAnalyzer(LanguageNames.CSharp)]
1313
public class XUnitTestMultipleCategoriesAnalyzer : DiagnosticAnalyzer
1414
{
15-
public const string DiagnosticId = "MAUI1001";
15+
public const string DiagnosticId = "MAUIT1002";
1616

1717
const string Title = "Test methods should have only one unique category";
1818
const string MessageFormat = "Test method '{0}' has {1} unique categories: {2}. Only a single unique category is allowed per test.";

src/TestUtils/src/UITest.Analyzers/NUnit/NUnitTestMissingCategoryAnalyzer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ namespace UITest.Analyzers.NUnit
1313
[DiagnosticAnalyzer(LanguageNames.CSharp)]
1414
public class NUnitTestMissingCategoryAnalyzer : DiagnosticAnalyzer
1515
{
16-
public const string DiagnosticId = "NUnitTestMissingCategoryAnalyzer";
16+
public const string DiagnosticId = "MAUIT1001";
1717

1818
const string Title = "Test methods should have a Category";
1919
const string MessageFormat = "Test method '{0}' should be marked with a `[Category]` attribute on the method or its parent class";
2020
const string Description = "Test methods should be marked with a `[Category]` attribute on the method or its parent class.";
2121

2222
private const string Category = "Testing";
2323

24-
private static readonly DiagnosticDescriptor Rule = new DiagnosticDescriptor(DiagnosticId, Title, MessageFormat, Category, DiagnosticSeverity.Warning, isEnabledByDefault: true, description: Description);
24+
private static readonly DiagnosticDescriptor Rule = new DiagnosticDescriptor(DiagnosticId, Title, MessageFormat, Category, DiagnosticSeverity.Error, isEnabledByDefault: true, description: Description);
2525

2626
public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get { return ImmutableArray.Create(Rule); } }
2727

0 commit comments

Comments
 (0)