public void IsThreat_WithUnsafeInput_ReturnsTrue() { // Arrange string input = "=cmd|'/C ping 127.0.0.1'!A0"; NoFormulaeExcelSanitizer sanitizer = new NoFormulaeExcelSanitizer(); // Act bool result = sanitizer.IsThreat(input); // Assert Assert.Equal(true, result); }
public void IsThreat_WithSafeInput_ReturnsFalse() { // Arrange string input = "This is a safe input."; NoFormulaeExcelSanitizer sanitizer = new NoFormulaeExcelSanitizer(); // Act bool result = sanitizer.IsThreat(input); // Assert Assert.Equal(false, result); }