public void WhenHasIllegalChars_ThenRemoveIllegalChars() { char illegalChar = '\0'; string s = $"this {illegalChar} that {illegalChar} this"; var result = XmlSanitizer.Sanitize(s); Assert.That(result, Is.EqualTo("this that this")); }
public void WhenIsEmpty_ThenReturnEmpty() { var result = XmlSanitizer.Sanitize(string.Empty); Assert.That(result, Is.Empty); }
public void WhenIsNull_ThenReturnNull() { var result = XmlSanitizer.Sanitize(null); Assert.That(result, Is.Null); }