Exemple #1
0
        public void ListBoxTest()
        {
            var containter = new ListBoxItem()
            {
                DataContext = itemViewModel1
            };

            containter.Content = originalSource;
            var itemsControl = new ListBox();

            itemsControl.Items.Add(containter);
            var result = converter.TestConvert(itemsControl, originalSource);

            Assert.AreEqual(itemViewModel1, result);
        }
Exemple #2
0
        public void ListBoxTest()
        {
            var containter = new ListBoxItem()
            {
                DataContext = itemViewModel1
            };

            containter.Content = originalSource;
            var itemsControl = new ListBox();

            itemsControl.Items.Add(containter);
            ShowControl(itemsControl);
            var result = converter.TestConvert(itemsControl, originalSource);

            Assert.AreEqual(itemViewModel1, result);
            Assert.AreEqual(itemViewModel1, ItemsControlMouseEventArgsConverter.GetDataRow(itemsControl, CreateMouseArgs()));
        }