public void SkipingWhile_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) } ); SkippingWhile <Item> skippingWhile = items.SkippingWhile(item => item.IsActive); skippingWhile.ValidateConsistency(); items[index].IsActive = newValue; skippingWhile.ValidateConsistency(); }
public void SubExpessing() { Param param = new Param(); ObservableCollection <Item> items = new ObservableCollection <Item>( new[] { new Item(true), new Item(false), new Item(true), new Item(false), new Item(true) } ); SkippingWhile <Item> skippingWhile = items.SkippingWhile(item => Expr.Is(() => param.Value ? (ObservableCollection <Item>)items.SkippingWhile(item1 => true) : items.SkippingWhile(item1 => item1.IsActive == item.IsActive)).Computing().Value.Count == 3); SkippingWhile <Item> skippingWhile2 = items.SkippingWhile(item => (param.Value ? items.SkippingWhile(item1 => true) : items.SkippingWhile(item1 => item1.IsActive == item.IsActive)).Count == 3); skippingWhile.ValidateConsistency(); skippingWhile2.ValidateConsistency(); param.Value = true; skippingWhile.ValidateConsistency(); skippingWhile2.ValidateConsistency(); }
public void SkipingWhile_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) } ); SkippingWhile <Item> skippingWhile = items.SkippingWhile(item => item.IsActive).IsNeededFor(consumer); skippingWhile.ValidateConsistency(); items[index] = new Item(itemNew); skippingWhile.ValidateConsistency(); consumer.Dispose(); }
public void SkipingWhile_Insert1( [Values(true, false)] bool newValue) { ObservableCollection <Item> items = new ObservableCollection <Item>( ); SkippingWhile <Item> skippingWhile = items.SkippingWhile(item => item.IsActive); skippingWhile.ValidateConsistency(); items.Insert(0, new Item(newValue)); skippingWhile.ValidateConsistency(); }
public void SkipingWhile_Initialization_01() { ObservableCollection <Item> items = new ObservableCollection <Item>(); SkippingWhile <Item> skippingWhile = items.SkippingWhile(item => item.IsActive); skippingWhile.ValidateConsistency(); }
public void SkipingWhile_Remove1( [Values(true, false)] bool item0) { ObservableCollection <Item> items = new ObservableCollection <Item>( new[] { new Item(item0) } ); SkippingWhile <Item> skippingWhile = items.SkippingWhile(item => item.IsActive); skippingWhile.ValidateConsistency(); items.RemoveAt(0); skippingWhile.ValidateConsistency(); }
public void SkipingWhile_Initialization_01() { ObservableCollection <Item> items = new ObservableCollection <Item>(); SkippingWhile <Item> skippingWhile = items.SkippingWhile(item => item.IsActive).IsNeededFor(consumer); skippingWhile.ValidateConsistency(); consumer.Dispose(); }
public void SkipingWhile_Change1( [Values(true, false)] bool item0) { ObservableCollection <Item> items = new ObservableCollection <Item>( new[] { new Item(item0) } ); SkippingWhile <Item> skippingWhile = items.SkippingWhile(item => item.IsActive).IsNeededFor(consumer); skippingWhile.ValidateConsistency(); items[0].IsActive = !items[0].IsActive; skippingWhile.ValidateConsistency(); consumer.Dispose(); }