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(); }
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(); }
public void IndicesComputing_Initialization_01() { ObservableCollection <Item> items = new ObservableCollection <Item>(); IndicesComputing <Item> indicesComputing = items.IndicesComputing(item => item.IsActive); indicesComputing.ValidateConsistency(); }
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(); }
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(); }
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(); }