Exemplo n.º 1
0
        public void AsTrackable_On_Collection_Add_Should_Raise_CollectionChanged()
        {
            IList <Order> orders = Helper.GetOrdersIList();

            IList <Order>            trackable  = orders.AsTrackable();
            INotifyCollectionChanged collection = (INotifyCollectionChanged)trackable;
            var monitor = collection.Monitor();

            trackable.Add(new Order());

            monitor.Should().Raise(nameof(INotifyCollectionChanged.CollectionChanged));
        }