Files
BinaryObjectScanner/BinaryObjectScanner.Test/Data/ProtectionDictionaryTests.cs

46 lines
1.3 KiB
C#
Raw Permalink Normal View History

2024-12-02 11:50:34 -05:00
using System.Collections.Generic;
2025-09-06 12:40:06 -04:00
using BinaryObjectScanner.Data;
2024-12-02 11:50:34 -05:00
using Xunit;
2025-09-06 12:40:06 -04:00
namespace BinaryObjectScanner.Test.Data
2024-12-02 11:50:34 -05:00
{
public class ProtectionDictionaryTests
2024-12-02 11:50:34 -05:00
{
#region ProcessProtectionString
[Fact]
public void ProcessProtectionString_Null_Empty()
{
string? protection = null;
List<string> actual = ProtectionDictionary.ProcessProtectionString(protection);
2024-12-02 11:50:34 -05:00
Assert.Empty(actual);
}
[Fact]
public void ProcessProtectionString_Empty_Empty()
{
string? protection = string.Empty;
List<string> actual = ProtectionDictionary.ProcessProtectionString(protection);
2024-12-02 11:50:34 -05:00
Assert.Empty(actual);
}
[Fact]
public void ProcessProtectionString_NoIndicator_Single()
{
string? protection = "item1";
List<string> actual = ProtectionDictionary.ProcessProtectionString(protection);
2024-12-02 11:50:34 -05:00
Assert.Single(actual);
}
[Fact]
public void ProcessProtectionString_Indicator_Multiple()
{
string? protection = "item1;item2";
List<string> actual = ProtectionDictionary.ProcessProtectionString(protection);
2024-12-02 11:50:34 -05:00
Assert.Equal(2, actual.Count);
}
#endregion
}
2025-11-07 08:24:22 -05:00
}