mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-02-04 05:35:49 +00:00
Add scanner helper method tests
This commit is contained in:
44
BinaryObjectScanner.Test/ScannerTests.cs
Normal file
44
BinaryObjectScanner.Test/ScannerTests.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
using System.Collections.Generic;
|
||||
using Xunit;
|
||||
|
||||
namespace BinaryObjectScanner.Test
|
||||
{
|
||||
public class ScannerTests
|
||||
{
|
||||
#region ProcessProtectionString
|
||||
|
||||
[Fact]
|
||||
public void ProcessProtectionString_Null_Empty()
|
||||
{
|
||||
string? protection = null;
|
||||
List<string> actual = Scanner.ProcessProtectionString(protection);
|
||||
Assert.Empty(actual);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ProcessProtectionString_Empty_Empty()
|
||||
{
|
||||
string? protection = string.Empty;
|
||||
List<string> actual = Scanner.ProcessProtectionString(protection);
|
||||
Assert.Empty(actual);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ProcessProtectionString_NoIndicator_Single()
|
||||
{
|
||||
string? protection = "item1";
|
||||
List<string> actual = Scanner.ProcessProtectionString(protection);
|
||||
Assert.Single(actual);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ProcessProtectionString_Indicator_Multiple()
|
||||
{
|
||||
string? protection = "item1;item2";
|
||||
List<string> actual = Scanner.ProcessProtectionString(protection);
|
||||
Assert.Equal(2, actual.Count);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user