public void NotifyItemAdded_ItemAdded_EntityFiresAggregateChangedEvent() { var collectionEntity = new EntityCollectionFixture(); AggregateChangedEventArgs args = null; collectionEntity.AggregateChanged += (obj, eventArgs) => { args = eventArgs; }; var item = collectionEntity.CreateCollectionItem(true); AssertItemAdded(args, item); }
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); }