Exemple #1
0
        public virtual void ShouldRedirectItemsWhenItemsSourceIsSet()
        {
            DomainUpDownItemsInitialization test = new DomainUpDownItemsInitialization();
            DomainUpDown dud = test.FindName("dud") as DomainUpDown;

            Assert.IsNotNull(dud);

            IEnumerable domainSource = new object[] { 1, 2, 3, 4, 5, 6, 7 };

            dud.ItemsSource = domainSource;

            Assert.AreEqual(7, dud.Items.Count);
        }
Exemple #2
0
        public virtual void ShouldBeAbleToInitializeThroughXamlAndSettingItems()
        {
            DomainUpDownItemsInitialization test = new DomainUpDownItemsInitialization();
            DomainUpDown dud = test.dud;

            Assert.IsNotNull(dud);

            Assert.AreEqual(2, dud.Items.Count);

            dud.Items.Add("another string");

            Assert.AreEqual(3, dud.Items.Count);
        }