Refactor code structure and optimize performance across multiple modules
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
using StellaOps.Scanner.Reachability;
|
||||
using Xunit;
|
||||
|
||||
using StellaOps.TestKit;
|
||||
namespace StellaOps.Scanner.Reachability.Tests;
|
||||
|
||||
public sealed class SinkRegistryTests
|
||||
{
|
||||
[Theory]
|
||||
[Trait("Category", TestCategories.Unit)]
|
||||
[Theory]
|
||||
[InlineData("dotnet", "System.Diagnostics.Process.Start", SinkCategory.CmdExec)]
|
||||
[InlineData("dotnet", "SYSTEM.DIAGNOSTICS.PROCESS.START", SinkCategory.CmdExec)]
|
||||
[InlineData("java", "java.io.ObjectInputStream.readObject", SinkCategory.UnsafeDeser)]
|
||||
@@ -18,7 +20,8 @@ public sealed class SinkRegistryTests
|
||||
Assert.Equal(expectedCategory, sink!.Category);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("Category", TestCategories.Unit)]
|
||||
[Fact]
|
||||
public void MatchSink_ReturnsNull_WhenUnknownLanguage()
|
||||
{
|
||||
Assert.Null(SinkRegistry.MatchSink("unknown", "whatever"));
|
||||
|
||||
Reference in New Issue
Block a user