Beispiel #1
0
        public void BoundPronounsTest()
        {
            var target = new AggregateEntity(
                new NounPhrase(new ProperPluralNoun("Americans")),
                new NounPhrase(new ProperPluralNoun("Canadians"))
                );
            IEnumerable <IReferencer> actual;
            IEnumerable <IReferencer> expected = new[] { new PersonalPronoun("them") };

            foreach (var r in expected)
            {
                target.BindReferencer(r);
            }
            actual = target.Referencers;
            Check.That(actual).Contains(expected);
        }
Beispiel #2
0
        public void BindPronounTest()
        {
            IEntity[] members =
            {
                new NounPhrase(new ProperPluralNoun("Americans")),
                new NounPhrase(new ProperPluralNoun("Canadians"))
            };
            var target = new AggregateEntity(members);
            var them   = new PersonalPronoun("them");

            target.BindReferencer(them);

            Check.That(target.Referencers).Contains(them);
            Check.That(them.RefersTo.Contains(target) || them.RefersTo == target || them.RefersTo.SetEqual(target)).IsTrue();

            foreach (var member in members)
            {
                Assert.True(them.RefersTo.Contains(member) || them.RefersTo == member);
            }
        }