Exemplo n.º 1
0
        public void UnselectAll_Clears_SelectedIndex_And_SelectedItem()
        {
            var target = new TestSelector
            {
                Template      = Template(),
                Items         = new[] { "Foo", "Bar", "Baz" },
                SelectionMode = SelectionMode.Multiple,
                SelectedIndex = 0,
            };

            target.ApplyTemplate();
            target.Presenter.ApplyTemplate();

            target.UnselectAll();

            Assert.Equal(-1, target.SelectedIndex);
            Assert.Equal(null, target.SelectedItem);
        }