public void TestExceptAndUnionWith()
        {
            _set.CollectionChanged += (sender, args) =>
            {
                CollectionAssert.AreEquivalent(new[] { "item 2" }, args.RemovedItems);
                CollectionAssert.AreEquivalent(new[] { "item 4", "item 5" }, args.AddedItems);
            };

            _set.ExceptAndUnionWith(
                new[] { "item 2", "item 3", "item 4" },
                new[] { "item 1", "item 3", "item 4", "item 5" });

            CollectionAssert.AreEquivalent(new[] { "item 1", "item 3", "item 4", "item 5" }, _set);
            ExpectChangeCalls(1);
        }
Beispiel #2
0
 private void OnCollectionChanged(
     object sender, CollectionChangedEventArgs <IReadOnlyList <Skill> > args)
 {
     _additionalSkillStatApplier.CleanSubscriptions(args.RemovedItems, args.AddedItems);
     _itemAttributesSkills?.ExceptAndUnionWith(args.RemovedItems, args.AddedItems);
 }