예제 #1
0
        public void DescriptorsTest()
        {
            var target = new AggregateEntity(
                new NounPhrase(new ProperPluralNoun("Americans")),
                new NounPhrase(new ProperPluralNoun("Canadians"))
                );
            IEnumerable <IDescriptor> actual;
            IDescriptor adj1 = new Adjective("western");
            IDescriptor adj2 = new Adjective("proud");

            target.BindDescriptor(adj1);
            target.BindDescriptor(adj2);
            actual = target.Descriptors;
            Check.That(target.Descriptors).Contains(adj1);
            Check.That(adj1.Describes).IsEqualTo(target);
            Check.That(target.Descriptors).Contains(adj2);
            Check.That(adj2.Describes).IsEqualTo(target);
        }
예제 #2
0
        public void BindDescriptorTest()
        {
            var target = new AggregateEntity(
                new NounPhrase(new ProperPluralNoun("Americans")),
                new NounPhrase(new ProperPluralNoun("Canadians"))
                );

            IDescriptor descriptor = new Adjective("rambunctious");

            target.BindDescriptor(descriptor);

            Check.That(target.Descriptors).Contains(descriptor);
        }