Fix CA1515
This commit is contained in:
committed by
Gustas Kažukauskas
parent
24c19f64c9
commit
42ac32dace
@@ -781,6 +781,9 @@ dotnet_diagnostic.CA1513.severity = warning
|
||||
# Avoid redundant length argument.
|
||||
dotnet_diagnostic.CA1514.severity = warning
|
||||
|
||||
# Consider making public types internal.
|
||||
dotnet_diagnostic.CA1515.severity = warning
|
||||
|
||||
### Naming Rules
|
||||
### https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/naming-warnings
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace OpenRA.Test
|
||||
sealed class MockLInfo : MockTraitInfo, NotBefore<MockJInfo> { }
|
||||
|
||||
[TestFixture]
|
||||
public class ActorInfoTest
|
||||
sealed class ActorInfoTest
|
||||
{
|
||||
[TestCase(TestName = "Trait ordering sorts in dependency order correctly")]
|
||||
public void TraitOrderingSortsCorrectly()
|
||||
|
||||
@@ -14,7 +14,7 @@ using NUnit.Framework;
|
||||
namespace OpenRA.Test
|
||||
{
|
||||
[TestFixture]
|
||||
public class CPosTest
|
||||
sealed class CPosTest
|
||||
{
|
||||
[TestCase(TestName = "Packing x,y and layer into int")]
|
||||
public void PackUnpackBits()
|
||||
|
||||
@@ -16,7 +16,7 @@ using NUnit.Framework;
|
||||
namespace OpenRA.Test
|
||||
{
|
||||
[TestFixture]
|
||||
public class CoordinateTest
|
||||
sealed class CoordinateTest
|
||||
{
|
||||
[TestCase(TestName = "Test CPos to MPos conversion and back again.")]
|
||||
public void CPosConversionRoundtrip()
|
||||
|
||||
@@ -15,7 +15,7 @@ using NUnit.Framework;
|
||||
namespace OpenRA.Test
|
||||
{
|
||||
[TestFixture]
|
||||
public class FluentTest
|
||||
sealed class FluentTest
|
||||
{
|
||||
readonly string pluralForms = @"
|
||||
label-players = {$player ->
|
||||
|
||||
@@ -15,7 +15,7 @@ using OpenRA.Widgets;
|
||||
namespace OpenRA.Test
|
||||
{
|
||||
[TestFixture]
|
||||
public class MediatorTest
|
||||
sealed class MediatorTest
|
||||
{
|
||||
[TestCase(TestName = "Mediator test")]
|
||||
public void Test()
|
||||
@@ -30,7 +30,7 @@ namespace OpenRA.Test
|
||||
}
|
||||
}
|
||||
|
||||
public class TestHandler : INotificationHandler<TestNotificaton>
|
||||
sealed class TestHandler : INotificationHandler<TestNotificaton>
|
||||
{
|
||||
public bool WasNotified { get; set; }
|
||||
|
||||
@@ -40,5 +40,5 @@ namespace OpenRA.Test
|
||||
}
|
||||
}
|
||||
|
||||
public class TestNotificaton { }
|
||||
sealed class TestNotificaton { }
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ using NUnit.Framework;
|
||||
namespace OpenRA.Test
|
||||
{
|
||||
[TestFixture]
|
||||
public class MiniYamlTest
|
||||
sealed class MiniYamlTest
|
||||
{
|
||||
[TestCase(TestName = "Parse tree roundtrips")]
|
||||
public void TestParseRoundtrip()
|
||||
|
||||
@@ -16,7 +16,7 @@ using OpenRA.Traits;
|
||||
namespace OpenRA.Test
|
||||
{
|
||||
[TestFixture]
|
||||
public class OrderTest
|
||||
sealed class OrderTest
|
||||
{
|
||||
static byte[] RoundTripOrder(byte[] bytes)
|
||||
{
|
||||
|
||||
@@ -15,7 +15,7 @@ using NUnit.Framework;
|
||||
namespace OpenRA.Test
|
||||
{
|
||||
[TestFixture]
|
||||
public class PlatformTest
|
||||
sealed class PlatformTest
|
||||
{
|
||||
string supportDir;
|
||||
string engineDir;
|
||||
|
||||
@@ -19,7 +19,7 @@ using OpenRA.Primitives;
|
||||
namespace OpenRA.Test
|
||||
{
|
||||
[TestFixture]
|
||||
public class PngTests
|
||||
sealed class PngTests
|
||||
{
|
||||
[Test]
|
||||
public void Save_ShouldProduceValidPngFile()
|
||||
@@ -128,6 +128,8 @@ namespace OpenRA.Test
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Ignore("Failing test should be fixed")]
|
||||
public void PngConstructor_CompressionMethodNotSupported_ThrowsInvalidDataException()
|
||||
{
|
||||
// Arrange
|
||||
|
||||
@@ -17,7 +17,7 @@ using OpenRA.Support;
|
||||
namespace OpenRA.Test
|
||||
{
|
||||
[TestFixture]
|
||||
public class VariableExpressionTest
|
||||
sealed class VariableExpressionTest
|
||||
{
|
||||
readonly IReadOnlyDictionary<string, int> testValues = new Dictionary<string, int>
|
||||
{
|
||||
|
||||
@@ -15,7 +15,7 @@ using OpenRA.Mods.Common.HitShapes;
|
||||
namespace OpenRA.Test
|
||||
{
|
||||
[TestFixture]
|
||||
public class ShapeTest
|
||||
sealed class ShapeTest
|
||||
{
|
||||
IHitShape shape;
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace OpenRA
|
||||
{
|
||||
using UtilityActions = Dictionary<string, KeyValuePair<Action<Utility, string[]>, Func<string[], bool>>>;
|
||||
|
||||
public class NoSuchCommandException : Exception
|
||||
sealed class NoSuchCommandException : Exception
|
||||
{
|
||||
public readonly string Command;
|
||||
public NoSuchCommandException(string command)
|
||||
|
||||
Reference in New Issue
Block a user