public void Sanitize_WithUnsafeInput_RemovesLeadingEqualsSign() { // Arrange string input = "=cmd|'/C ping 127.0.0.1'!A0"; NoFormulaeExcelSanitizer sanitizer = new NoFormulaeExcelSanitizer(); // Act string result = sanitizer.Sanitize(input); // Assert Assert.Equal("cmd|'/C ping 127.0.0.1'!A0", result); }
public void Sanitize_WithSafeInput_ReturnsInputUnmodified() { // Arrange string input = "This is a safe input."; NoFormulaeExcelSanitizer sanitizer = new NoFormulaeExcelSanitizer(); // Act string result = sanitizer.Sanitize(input); // Assert Assert.Equal("This is a safe input.", result); }