Beispiel #1
0
        public void AttachObjectViaPrepositionTest()
        {
            var            target              = new VerbPhrase(new BaseVerb("consume"));
            IPrepositional prepositional       = new Preposition("with");
            ILexical       prepositionalObject = new NounPhrase(new Adjective("great"), new CommonSingularNoun("haste"));

            prepositional.BindObject(prepositionalObject);
            target.AttachObjectViaPreposition(prepositional);
            Check.That(target.ObjectOfThePreposition).IsEqualTo(prepositionalObject);
        }
Beispiel #2
0
        public void BindObjectTest()
        {
            var      target = new ParticlePhrase(new Particle("off"), new Preposition("of"));
            ILexical prepositionalObject = new NounPhrase(new Determiner("the"), new CommonSingularNoun("world"));

            target.BindObject(prepositionalObject);
            Check.That(target.BoundObject).IsEqualTo(prepositionalObject);
            IVerbal linkedVerbal = new VerbPhrase(new PastTenseVerb("jumped"));

            linkedVerbal.AttachObjectViaPreposition(target);
            Check.That(linkedVerbal.ObjectOfThePreposition).IsEqualTo(prepositionalObject);
        }