コード例 #1
0
        protected override void Act()
        {
            collection = Section.GetDescendentsOfType <NamedElementCollection <TestNamedElement> >()
                         .Where(e => e.Name == property.DisplayName).OfType <ElementCollectionViewModel>().First();

            var newItem = collection.AddNewCollectionElement(typeof(TestNamedElement));

            Assert.IsTrue(collection.ValidationResults.Any(e => e.Message == CollectionCountOneValidator.Message));
            newItem.Delete();
            collection.Validate();
        }
コード例 #2
0
 protected override void Act()
 {
     collectionElement.Validate();
 }
コード例 #3
0
        protected override void Act()
        {
            collection = Section.GetDescendentsOfType<NamedElementCollection<TestNamedElement>>()
                .Where(e => e.Name == property.DisplayName).OfType<ElementCollectionViewModel>().First();

            var newItem = collection.AddNewCollectionElement(typeof(TestNamedElement));
            Assert.IsTrue(collection.ValidationResults.Any(e => e.Message == CollectionCountOneValidator.Message));
            newItem.Delete();
            collection.Validate();
        }