Beispiel #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();
        }
 protected override void Act()
 {
     collectionElement.Validate();
 }
        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();
        }