Exemplo n.º 1
0
        public void TestCollectionRemoveEvent()
        {
            OwnedItemCollection<OwnedItem> numbers = new OwnedItemCollection<OwnedItem>();

            OwnedItem item = new OwnedItem();
            item.Removed += ItemRemoved;

            numbers.Add(item);

            _count = 0;

            numbers.Remove(item);

            Assert.AreEqual(_count, 1);
        }
Exemplo n.º 2
0
        public void TestCollectionRemoveEvent()
        {
            OwnedItemCollection <OwnedItem> numbers = new OwnedItemCollection <OwnedItem>();

            OwnedItem item = new OwnedItem();

            item.Removed += ItemRemoved;

            numbers.Add(item);

            _count = 0;

            numbers.Remove(item);

            Assert.AreEqual(_count, 1);
        }