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

                );

            AnyComputing <Item> anyComputing = items.AnyComputing(item => item.IsActive).IsNeededFor(consumer);

            anyComputing.ValidateConsistency();
            items[index].IsActive = newValue;
            anyComputing.ValidateConsistency();
        }
Exemple #2
0
        public void AnyComputing_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)
            }

                );

            AnyComputing <Item> anyComputing = items.AnyComputing(item => item.IsActive).For(consumer);

            anyComputing.ValidateConsistency();
            items.Move(oldIndex, newIndex);
            anyComputing.ValidateConsistency();
        }
Exemple #3
0
        public void AnyComputing_Set(
            [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 itemNew)
        {
            ObservableCollection <Item> items = new ObservableCollection <Item>(
                new[]
            {
                new Item(item0),
                new Item(item1),
                new Item(item2),
                new Item(item3),
                new Item(item4)
            }

                );

            AnyComputing <Item> anyComputing = items.AnyComputing(item => item.IsActive);

            anyComputing.ValidateConsistency();
            items[index] = new Item(itemNew);
            anyComputing.ValidateConsistency();
        }
Exemple #4
0
        public void AnyComputing_Insert1(
            [Values(true, false)] bool newValue)
        {
            ObservableCollection <Item> items = new ObservableCollection <Item>(
                );

            AnyComputing <Item> anyComputing = items.AnyComputing(item => item.IsActive).IsNeededFor(consumer);

            anyComputing.ValidateConsistency();
            items.Insert(0, new Item(newValue));
            anyComputing.ValidateConsistency();
        }
Exemple #5
0
        public void AnyComputing_Initialization_01()
        {
            ObservableCollection <Item> items = new ObservableCollection <Item>();

            AnyComputing <Item> anyComputing = items.AnyComputing(item => item.IsActive).IsNeededFor(consumer);

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

                );

            AnyComputing <Item> anyComputing = items.AnyComputing(item => item.IsActive).IsNeededFor(consumer);

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