Beispiel #1
0
        public void GetSelectList_Simple_03()
        {
            var selectList = HtmlExtensions.GetSelectList(typeof(MyEnum), true);

            Assert.AreEqual(5, selectList.Count);
            Assert.AreEqual(string.Empty, selectList[0].Text);
        }
Beispiel #2
0
        public void GetSelectList_WithValues_02()
        {
            var selectList = HtmlExtensions.GetSelectList(typeof(MyEnum), true, MyEnum.One, MyEnum.Two);

            Assert.AreEqual(5, selectList.Count);
            Assert.IsFalse(selectList[1].Selected);
            Assert.IsTrue(selectList[2].Selected);
            Assert.IsTrue(selectList[3].Selected);
        }
Beispiel #3
0
        public void GetSelectList_Simple_02()
        {
            var selectList = HtmlExtensions.GetSelectList(typeof(MyEnum), false);

            Assert.AreEqual("Un", selectList[1].Text);
        }
Beispiel #4
0
        public void GetSelectList_Simple_01()
        {
            var selectList = HtmlExtensions.GetSelectList(typeof(MyEnum), false);

            Assert.AreEqual(4, selectList.Count);
        }