public void Task_02_Unselect() { var c = new RadioSelectionContainer <SelectionItem>(); c.Select(A); c.Unselect(A); c.SelectedItems.Should().BeEquivalentTo(A); }
public SelectionContainerViewModel() { Items = new ObservableCollection <DataItem> { a, b, c, d, e }; SingleSelectionContainer = new SingleSelectionContainer <DataItem>(b); RadioSelectionContainer = new RadioSelectionContainer <DataItem>(a); MultipleSelectionContainer = new MultipleSelectionContainer <DataItem>(new[] { c, d, e }); SelectCommand = new NotifiableCommand(HandleSelect, () => true); ClearCommand = new NotifiableCommand(HandleClear, () => true); }
public void Task_01_Empty_Access() { var c = new RadioSelectionContainer <SelectionItem>(); Assert.Throws <InvalidOperationException>(() => c[A].Should().BeFalse()); }