Exemple #1
0
        public void AggregateIndirectObjectTest()
        {
            var              text   = "attack";
            Verb             target = new BaseVerb(text);
            IAggregateEntity actual;

            actual = target.AggregateIndirectObject;
            Check.That(actual).IsEmpty();
            IEntity indirectObject = new CommonPluralNoun("monkeys");

            target.BindIndirectObject(indirectObject);
            actual = target.AggregateIndirectObject;
            Check.That(new[] { indirectObject }.Except(actual)).IsEmpty();
        }
Exemple #2
0
        public void IndirectObjectsTest()
        {
            var  text   = "attack";
            Verb target = new BaseVerb(text);
            IEnumerable <IEntity> actual;

            actual = target.IndirectObjects;
            Check.That(actual).IsEmpty();
            IEntity indirectObject = new CommonPluralNoun("allies");

            target.BindIndirectObject(indirectObject);
            actual = target.IndirectObjects;
            Check.That(actual).Contains(indirectObject);
            Check.That(target.AggregateIndirectObject).Contains(indirectObject);
        }