示例#1
0
        public void ConjunctionPhraseConstructorTest()
        {
            IEnumerable <Word> composedWords = new[] { new Conjunction("or") };
            var target = new ConjunctionPhrase(composedWords);

            Check.That(target.Text).IsEqualTo(string.Join(" ", composedWords.Select(w => w.Text)));
        }
示例#2
0
        public void JoinedRightTest()
        {
            IEnumerable <Word> composedWords = new[] { new Conjunction("and") };
            var      target   = new ConjunctionPhrase(composedWords);
            ILexical expected = new CommonPluralNoun("pies");
            ILexical actual;

            target.JoinedRight = expected;
            actual             = target.JoinedRight;
            Check.That(actual).IsEqualTo(expected);
        }
示例#3
0
        public void JoinedLeftTest()
        {
            IEnumerable <Word> composedWords = new[] { new Conjunction("and") };
            var      target   = new ConjunctionPhrase(composedWords);
            ILexical expected = new NounPhrase(new[] { new CommonSingularNoun("cake") });
            ILexical actual;

            target.JoinedLeft = expected;
            actual            = target.JoinedLeft;
            Check.That(actual).IsEqualTo(expected);
        }