Exemple #1
0
        public void AllComputing_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)
            }

                );

            AllComputing <Item> allComputing = items.AllComputing(item => item.IsActive).For(consumer);

            allComputing.ValidateConsistency();
            items[index].IsActive = newValue;
            allComputing.ValidateConsistency();
        }
        public void AllComputing_Move(
            [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 oldIndex,
            [Range(0, 4, 1)] int newIndex)
        {
            ObservableCollection <Item> items = new ObservableCollection <Item>(
                new[]
            {
                new Item(item0),
                new Item(item1),
                new Item(item2),
                new Item(item3),
                new Item(item4)
            }

                );

            AllComputing <Item> allComputing = items.AllComputing(item => item.IsActive).IsNeededFor(consumer);

            allComputing.ValidateConsistency();
            items.Move(oldIndex, newIndex);
            allComputing.ValidateConsistency();
        }
Exemple #3
0
        public void AllComputing_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)
            }

                );

            AllComputing <Item> allComputing = items.AllComputing(item => item.IsActive);

            allComputing.ValidateConsistency();
            items.RemoveAt(index);
            allComputing.ValidateConsistency();
        }
Exemple #4
0
        public void AllComputing_Initialization_01()
        {
            ObservableCollection <Item> items = new ObservableCollection <Item>();

            AllComputing <Item> allComputing = items.AllComputing(item => item.IsActive).For(consumer);

            allComputing.ValidateConsistency();
        }
Exemple #5
0
        public void AllComputing_Insert1(
            [Values(true, false)] bool newValue)
        {
            ObservableCollection <Item> items = new ObservableCollection <Item>();

            AllComputing <Item> allComputing = items.AllComputing(item => item.IsActive).For(consumer);

            allComputing.ValidateConsistency();
            items.Insert(0, new Item(newValue));
            allComputing.ValidateConsistency();
        }
Exemple #6
0
        public void AllComputing_Remove1(
            [Values(true, false)] bool item0)
        {
            ObservableCollection <Item> items = new ObservableCollection <Item>(
                new[]
            {
                new Item(item0)
            }
                );

            AllComputing <Item> allComputing = items.AllComputing(item => item.IsActive).For(consumer);

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