public static IRedactor UseMatcher <T>(this RedactorProcess obj, IRedactorOptions options) where T : IMatcher
        {
            obj.Matcher = Activator.CreateInstance <T>();
            obj.Matcher.Configure(options);
            obj.MatcherType = typeof(T);

            return(obj);
        }
        public void MustGetConfiguration()
        {
            RegularExpressionMatcher rem = new RegularExpressionMatcher();

            rem.Configure(new RedactorOptions()
            {
                RedactCharacter = '&'
            });

            IRedactorOptions options = rem.GetConfiguration();

            Assert.NotNull(options);
            Assert.NotNull(options.RedactCharacter);
            Assert.Equal('&', options.RedactCharacter);
        }
        public void MustGetConfiguration()
        {
            MatchProcessor m = new MatchProcessor();

            m.Configure(new RedactorOptions()
            {
                RedactCharacter = '&'
            });

            IRedactorOptions options = m.GetConfiguration();

            Assert.NotNull(options);
            Assert.NotNull(options.RedactCharacter);
            Assert.Equal('&', options.RedactCharacter);
        }
        public static IRedactor UseExpressionMatcher <T>(this RedactorProcess obj, string expression, IRedactorOptions options) where T : IExpressionMatcher
        {
            obj.Matcher     = Activator.CreateInstance <T>();
            obj.MatcherType = typeof(T);
            (obj.Matcher as IExpressionMatcher).Expression = expression;
            obj.Matcher.Configure(options);

            return(obj);
        }