Example #1
0
        public void Remove()
        {
            var redactor = new Redactor();

            redactor.Add("password123");
            redactor.Remove("password123");
            var actual = redactor.Redact("this is a password: password123");

            Assert.AreEqual("this is a password: password123", actual);
        }
Example #2
0
        public void RemoveThrows()
        {
            var redactor = new Redactor();

            try
            {
                redactor.Remove("password123");
                Assert.Fail("Should have thrown exception");
            }
            catch (RedactionStringNotFoundException)
            {
            }
        }