public void NotifyItemAdded_ItemAdded_EntityFiresAggregateChangedEvent()
        {
            var collectionEntity = new EntityCollectionFixture();
            var item = collectionEntity.CreateCollectionItem ( true );

            AggregateChangedEventArgs args = null;

            collectionEntity.AggregateChanged += (obj, eventArgs) => { args = eventArgs; };
            var itemItem = item.CreateCollectionItemItem ();

            AssertItemAdded(args, itemItem);
        }
        public void SByteProperty_ChangingPropertyTwice_FiresOnAggregateChangedEventOneTimeOnly()
        {
            bool aggregateIsDirty = false;
            var collectionEntity = new EntityCollectionFixture ();
            var item = collectionEntity.CreateCollectionItem ( true );
            collectionEntity.AggregateChanged += (obj, eventArgs) => { aggregateIsDirty = true; };

            aggregateIsDirty = false;
            item.PropertyValue = false;

            Assert.IsTrue(aggregateIsDirty);
        }
 public CollectionItem( EntityCollectionFixture entityCollectionFixture, bool propertyValue )
 {
     _collectionItemItems = new List<CollectionItemItem> ();
     EntityCollectionFixture = entityCollectionFixture;
     _propertyValue = propertyValue;
 }
Exemple #4
0
 public CollectionItem(EntityCollectionFixture entityCollectionFixture, bool propertyValue)
 {
     _collectionItemItems    = new List <CollectionItemItem> ();
     EntityCollectionFixture = entityCollectionFixture;
     _propertyValue          = propertyValue;
 }