Esempio n. 1
0
            public Person(Pronoun pronouns)
            {
                Pronouns = pronouns;

                Matchers = new ControlStringMatcherCollection(new List <IControlStringMatcher>()
                {
                    new ContextControlStringMatcher("Pronoun", Pronouns),
                    new ValueControlStringMatcher("Prefix", () => prefix),
                    new ValueControlStringMatcher("Postfix", () => postfix),
                    new ValueControlStringMatcher("Rank", () => rank),
                    new ValueControlStringMatcher("Name", () => name),
                    new ValueControlStringMatcher("FullName", () => FullName)
                });

                parser = new Parser(new ControlStringFinder('{', ':', '}', '[', ']', '|'), Matchers, new NullTransformer());
            }
Esempio n. 2
0
 public void Matches_WhenControlStringIsNull_ThrowsArgumentNullException(ControlStringMatcherCollection unit)
 {
     Should.Throw <ArgumentNullException>(() => unit.Matches(null));
 }