コード例 #1
0
        public void IndicesComputing_Change(
            [Values(true, false)] bool item0,
            [Values(true, false)] bool item1,
            [Values(true, false)] bool item2,
            [Values(true, false)] bool item3,
            [Values(true, false)] bool item4,
            [Range(0, 4, 1)] int index,
            [Values(true, false)] bool newValue)
        {
            ObservableCollection <Item> items = new ObservableCollection <Item>(
                new[]
            {
                new Item(item0),
                new Item(item1),
                new Item(item2),
                new Item(item3),
                new Item(item4)
            }

                );

            IndicesComputing <Item> indicesComputing = items.IndicesComputing(item => item.IsActive).For(consumer);

            indicesComputing.ValidateConsistency();
            items[index].IsActive = newValue;
            indicesComputing.ValidateConsistency();
            consumer.Dispose();
        }
コード例 #2
0
        public void IndicesComputing_Remove(
            [Values(true, false)] bool item0,
            [Values(true, false)] bool item1,
            [Values(true, false)] bool item2,
            [Values(true, false)] bool item3,
            [Values(true, false)] bool item4,
            [Range(0, 4, 1)] int index)
        {
            ObservableCollection <Item> items = new ObservableCollection <Item>(
                new[]
            {
                new Item(item0),
                new Item(item1),
                new Item(item2),
                new Item(item3),
                new Item(item4)
            }

                );

            IndicesComputing <Item> indicesComputing = items.IndicesComputing(item => item.IsActive);

            indicesComputing.ValidateConsistency();
            items.RemoveAt(index);
            indicesComputing.ValidateConsistency();
        }
コード例 #3
0
        public void IndicesComputing_Initialization_01()
        {
            ObservableCollection <Item> items = new ObservableCollection <Item>();

            IndicesComputing <Item> indicesComputing = items.IndicesComputing(item => item.IsActive);

            indicesComputing.ValidateConsistency();
        }
コード例 #4
0
        public void IndicesComputing_Initialization_01()
        {
            ObservableCollection <Item> items = new ObservableCollection <Item>();

            IndicesComputing <Item> indicesComputing = items.IndicesComputing(item => item.IsActive).IsNeededFor(consumer);

            indicesComputing.ValidateConsistency();
            consumer.Dispose();
        }
コード例 #5
0
        public void IndicesComputing_Insert1(
            [Values(true, false)] bool newValue)
        {
            ObservableCollection <Item> items = new ObservableCollection <Item>(

                );

            IndicesComputing <Item> indicesComputing = items.IndicesComputing(item => item.IsActive);

            indicesComputing.ValidateConsistency();
            items.Insert(0, new Item(newValue));
            indicesComputing.ValidateConsistency();
        }
コード例 #6
0
        public void IndicesComputing_Remove1(
            [Values(true, false)] bool item0)
        {
            ObservableCollection <Item> items = new ObservableCollection <Item>(
                new[]
            {
                new Item(item0)
            }

                );

            IndicesComputing <Item> indicesComputing = items.IndicesComputing(item => item.IsActive);

            indicesComputing.ValidateConsistency();
            items.RemoveAt(0);
            indicesComputing.ValidateConsistency();
        }