public void When_Full_Redaction_Redact_Everything() { LogManager.RedactionLevel = RedactionLevel.Full; Assert.AreEqual("<ud>user</ud>", RedactableArgument.User("user").ToString()); Assert.AreEqual("<md>meta</md>", RedactableArgument.Meta("meta").ToString()); Assert.AreEqual("<sd>system</sd>", RedactableArgument.System("system").ToString()); }
public void When_Redaction_Disabled_No_Redaction_Occurs() { LogManager.RedactionLevel = RedactionLevel.None; Assert.AreEqual("1", RedactableArgument.User("1").ToString()); Assert.AreEqual(null, RedactableArgument.Meta(null).ToString()); Assert.AreEqual("system", RedactableArgument.System("system").ToString()); }
public void When_User_Redaction_Redact_Partial() { LogManager.RedactionLevel = RedactionLevel.Partial; Assert.AreEqual("<ud>user</ud>", RedactableArgument.User("user").ToString()); Assert.AreEqual("meta", RedactableArgument.Meta("meta").ToString()); Assert.AreEqual("system", RedactableArgument.System("system").ToString()); }