public void BulletedList_FirstBulletNumber_Render()
        {
            PokerBulletedList b = new PokerBulletedList();

            AddListItems(b);
            b.BulletStyle       = BulletStyle.Numbered;
            b.FirstBulletNumber = 3;
            Assert.AreEqual(b.Render(), "<ol start=\"3\" style=\"list-style-type:decimal;\">\n\t<li>Item1</li><li>Item2</li><li>Item3</li><li>Item4</li><li>Item5</li><li>Item6</li><li>Item7</li><li>Item8</li><li>Item9</li><li>Item10</li>\n</ol>", "FirstBulletNumber1");
            b.FirstBulletNumber = 6;
            Assert.AreEqual(b.Render(), "<ol start=\"6\" style=\"list-style-type:decimal;\">\n\t<li>Item1</li><li>Item2</li><li>Item3</li><li>Item4</li><li>Item5</li><li>Item6</li><li>Item7</li><li>Item8</li><li>Item9</li><li>Item10</li>\n</ol>", "FirstBulletNumber2");
            b.FirstBulletNumber = -2;
            Assert.AreEqual(b.Render(), "<ol start=\"-2\" style=\"list-style-type:decimal;\">\n\t<li>Item1</li><li>Item2</li><li>Item3</li><li>Item4</li><li>Item5</li><li>Item6</li><li>Item7</li><li>Item8</li><li>Item9</li><li>Item10</li>\n</ol>", "FirstBulletNumber3");
        }
        public void BulletedList_ButtonLinkDisplayMode_Render()
        {
            PokerBulletedList b = new PokerBulletedList();

            AddListItems(b);
            b.DisplayMode = BulletedListDisplayMode.LinkButton;
            b.ID          = "BulletedListTest";
            Page p = new Page();

            p.Controls.Add(b);
            p.EnableEventValidation = false;
            string html = b.Render();

            MonoTests.stand_alone.WebHarness.HtmlDiff.AssertAreEqual(b.Render(), "<ul id=\"BulletedListTest\">\n\t<li><a href=\"javascript:__doPostBack('BulletedListTest','0')\">Item1</a></li><li><a href=\"javascript:__doPostBack('BulletedListTest','1')\">Item2</a></li><li><a href=\"javascript:__doPostBack('BulletedListTest','2')\">Item3</a></li><li><a href=\"javascript:__doPostBack('BulletedListTest','3')\">Item4</a></li><li><a href=\"javascript:__doPostBack('BulletedListTest','4')\">Item5</a></li><li><a href=\"javascript:__doPostBack('BulletedListTest','5')\">Item6</a></li><li><a href=\"javascript:__doPostBack('BulletedListTest','6')\">Item7</a></li><li><a href=\"javascript:__doPostBack('BulletedListTest','7')\">Item8</a></li><li><a href=\"javascript:__doPostBack('BulletedListTest','8')\">Item9</a></li><li><a href=\"javascript:__doPostBack('BulletedListTest','9')\">Item10</a></li>\n</ul>", "BulletedListDisplayMode.LinkButton");
        }
        public void BulletedList_HyperLinkDisplayMode_Render()
        {
            PokerBulletedList b     = new PokerBulletedList();
            ListItem          item1 = new ListItem("HyperLink1", "TextFile1.txt");
            ListItem          item2 = new ListItem("HyperLink2", "TextFile2.txt");

            b.Items.Add(item1);
            b.Items.Add(item2);
            b.DisplayMode = BulletedListDisplayMode.HyperLink;
            Assert.AreEqual(b.Render(), "<ul>\n\t<li><a href=\"TextFile1.txt\">HyperLink1</a></li><li><a href=\"TextFile2.txt\">HyperLink2</a></li>\n</ul>", "BulletedListDisplayMode.HyperLink");
        }
        public void BulletedList_BulletStyle_Render()
        {
            PokerBulletedList b = new PokerBulletedList();

            AddListItems(b);
            Assert.AreEqual(b.Render(), "<ul>\n\t<li>Item1</li><li>Item2</li><li>Item3</li><li>Item4</li><li>Item5</li><li>Item6</li><li>Item7</li><li>Item8</li><li>Item9</li><li>Item10</li>\n</ul>", "Render1");
            b.BulletStyle = BulletStyle.Square;
            Assert.AreEqual(b.Render(), "<ul style=\"list-style-type:square;\">\n\t<li>Item1</li><li>Item2</li><li>Item3</li><li>Item4</li><li>Item5</li><li>Item6</li><li>Item7</li><li>Item8</li><li>Item9</li><li>Item10</li>\n</ul>", "BulletStyle.Square");
            b.BulletStyle = BulletStyle.LowerRoman;
            Assert.AreEqual(b.Render(), "<ol style=\"list-style-type:lower-roman;\">\n\t<li>Item1</li><li>Item2</li><li>Item3</li><li>Item4</li><li>Item5</li><li>Item6</li><li>Item7</li><li>Item8</li><li>Item9</li><li>Item10</li>\n</ol>", "BulletStyle.LowerRoman");
            b.BulletStyle = BulletStyle.Circle;
            Assert.AreEqual(b.Render(), "<ul style=\"list-style-type:circle;\">\n\t<li>Item1</li><li>Item2</li><li>Item3</li><li>Item4</li><li>Item5</li><li>Item6</li><li>Item7</li><li>Item8</li><li>Item9</li><li>Item10</li>\n</ul>", "BulletStyle.Circle");
            b.BulletStyle = BulletStyle.Disc;
            Assert.AreEqual(b.Render(), "<ul style=\"list-style-type:disc;\">\n\t<li>Item1</li><li>Item2</li><li>Item3</li><li>Item4</li><li>Item5</li><li>Item6</li><li>Item7</li><li>Item8</li><li>Item9</li><li>Item10</li>\n</ul>", "BulletStyle.Disc");
            b.BulletStyle = BulletStyle.LowerAlpha;
            Assert.AreEqual(b.Render(), "<ol style=\"list-style-type:lower-alpha;\">\n\t<li>Item1</li><li>Item2</li><li>Item3</li><li>Item4</li><li>Item5</li><li>Item6</li><li>Item7</li><li>Item8</li><li>Item9</li><li>Item10</li>\n</ol>", "BulletStyle.LowerAlpha");
            b.BulletStyle = BulletStyle.Numbered;
            Assert.AreEqual(b.Render(), "<ol style=\"list-style-type:decimal;\">\n\t<li>Item1</li><li>Item2</li><li>Item3</li><li>Item4</li><li>Item5</li><li>Item6</li><li>Item7</li><li>Item8</li><li>Item9</li><li>Item10</li>\n</ol>", "BulletStyle.Numbered");
            b.BulletStyle = BulletStyle.UpperAlpha;
            Assert.AreEqual(b.Render(), "<ol style=\"list-style-type:upper-alpha;\">\n\t<li>Item1</li><li>Item2</li><li>Item3</li><li>Item4</li><li>Item5</li><li>Item6</li><li>Item7</li><li>Item8</li><li>Item9</li><li>Item10</li>\n</ol>", "BulletStyle.UpperAlpha");
            b.BulletStyle = BulletStyle.UpperRoman;
            Assert.AreEqual(b.Render(), "<ol style=\"list-style-type:upper-roman;\">\n\t<li>Item1</li><li>Item2</li><li>Item3</li><li>Item4</li><li>Item5</li><li>Item6</li><li>Item7</li><li>Item8</li><li>Item9</li><li>Item10</li>\n</ol>", "BulletStyle.UpperRoman");
            b.BulletStyle = BulletStyle.NotSet;
            Assert.AreEqual(b.Render(), "<ul>\n\t<li>Item1</li><li>Item2</li><li>Item3</li><li>Item4</li><li>Item5</li><li>Item6</li><li>Item7</li><li>Item8</li><li>Item9</li><li>Item10</li>\n</ul>", "BulletStyle.NotSet");
            b.BulletStyle    = BulletStyle.CustomImage;
            b.BulletImageUrl = "Images/edit.gif";
            Assert.AreEqual(b.Render(), "<ul style=\"list-style-image:url(Images/edit.gif);\">\n\t<li>Item1</li><li>Item2</li><li>Item3</li><li>Item4</li><li>Item5</li><li>Item6</li><li>Item7</li><li>Item8</li><li>Item9</li><li>Item10</li>\n</ul>", "BulletStyle.CustomImage");
        }
Beispiel #5
0
		public void BulletedList_FirstBulletNumber_Render ()
		{
			PokerBulletedList b = new PokerBulletedList ();
			AddListItems (b);
			b.BulletStyle = BulletStyle.Numbered;
			b.FirstBulletNumber = 3;
			Assert.AreEqual (b.Render (), "<ol start=\"3\" style=\"list-style-type:decimal;\">\n\t<li>Item1</li><li>Item2</li><li>Item3</li><li>Item4</li><li>Item5</li><li>Item6</li><li>Item7</li><li>Item8</li><li>Item9</li><li>Item10</li>\n</ol>", "FirstBulletNumber1");
			b.FirstBulletNumber = 6;
			Assert.AreEqual (b.Render (), "<ol start=\"6\" style=\"list-style-type:decimal;\">\n\t<li>Item1</li><li>Item2</li><li>Item3</li><li>Item4</li><li>Item5</li><li>Item6</li><li>Item7</li><li>Item8</li><li>Item9</li><li>Item10</li>\n</ol>", "FirstBulletNumber2");
			b.FirstBulletNumber = -2;
			Assert.AreEqual (b.Render (), "<ol start=\"-2\" style=\"list-style-type:decimal;\">\n\t<li>Item1</li><li>Item2</li><li>Item3</li><li>Item4</li><li>Item5</li><li>Item6</li><li>Item7</li><li>Item8</li><li>Item9</li><li>Item10</li>\n</ol>", "FirstBulletNumber3");

		}
Beispiel #6
0
		public void BulletedList_ButtonLinkDisplayMode_Render ()
		{
			PokerBulletedList b = new PokerBulletedList ();
			AddListItems (b);
			b.DisplayMode = BulletedListDisplayMode.LinkButton;
			b.ID = "BulletedListTest";
			Page p = new Page ();
			p.Controls.Add (b);
			p.EnableEventValidation = false;
			string html = b.Render ();
			MonoTests.stand_alone.WebHarness.HtmlDiff.AssertAreEqual (b.Render (), "<ul id=\"BulletedListTest\">\n\t<li><a href=\"javascript:__doPostBack('BulletedListTest','0')\">Item1</a></li><li><a href=\"javascript:__doPostBack('BulletedListTest','1')\">Item2</a></li><li><a href=\"javascript:__doPostBack('BulletedListTest','2')\">Item3</a></li><li><a href=\"javascript:__doPostBack('BulletedListTest','3')\">Item4</a></li><li><a href=\"javascript:__doPostBack('BulletedListTest','4')\">Item5</a></li><li><a href=\"javascript:__doPostBack('BulletedListTest','5')\">Item6</a></li><li><a href=\"javascript:__doPostBack('BulletedListTest','6')\">Item7</a></li><li><a href=\"javascript:__doPostBack('BulletedListTest','7')\">Item8</a></li><li><a href=\"javascript:__doPostBack('BulletedListTest','8')\">Item9</a></li><li><a href=\"javascript:__doPostBack('BulletedListTest','9')\">Item10</a></li>\n</ul>", "BulletedListDisplayMode.LinkButton");

		}
Beispiel #7
0
		public void BulletedList_HyperLinkDisplayMode_Render ()
		{
			PokerBulletedList b = new PokerBulletedList ();
			ListItem item1 = new ListItem ("HyperLink1", "TextFile1.txt");
			ListItem item2 = new ListItem ("HyperLink2", "TextFile2.txt");
			b.Items.Add (item1);
			b.Items.Add (item2);
			b.DisplayMode = BulletedListDisplayMode.HyperLink;
			Assert.AreEqual (b.Render (), "<ul>\n\t<li><a href=\"TextFile1.txt\">HyperLink1</a></li><li><a href=\"TextFile2.txt\">HyperLink2</a></li>\n</ul>", "BulletedListDisplayMode.HyperLink");			
		}
Beispiel #8
0
		public void BulletedList_BulletStyle_Render ()
		{
			PokerBulletedList b = new PokerBulletedList ();
			AddListItems (b);
			Assert.AreEqual (b.Render (), "<ul>\n\t<li>Item1</li><li>Item2</li><li>Item3</li><li>Item4</li><li>Item5</li><li>Item6</li><li>Item7</li><li>Item8</li><li>Item9</li><li>Item10</li>\n</ul>", "Render1");
			b.BulletStyle = BulletStyle.Square;
			Assert.AreEqual (b.Render (), "<ul style=\"list-style-type:square;\">\n\t<li>Item1</li><li>Item2</li><li>Item3</li><li>Item4</li><li>Item5</li><li>Item6</li><li>Item7</li><li>Item8</li><li>Item9</li><li>Item10</li>\n</ul>", "BulletStyle.Square");
			b.BulletStyle = BulletStyle.LowerRoman;
			Assert.AreEqual (b.Render (), "<ol style=\"list-style-type:lower-roman;\">\n\t<li>Item1</li><li>Item2</li><li>Item3</li><li>Item4</li><li>Item5</li><li>Item6</li><li>Item7</li><li>Item8</li><li>Item9</li><li>Item10</li>\n</ol>", "BulletStyle.LowerRoman");
			b.BulletStyle = BulletStyle.Circle;
			Assert.AreEqual (b.Render (), "<ul style=\"list-style-type:circle;\">\n\t<li>Item1</li><li>Item2</li><li>Item3</li><li>Item4</li><li>Item5</li><li>Item6</li><li>Item7</li><li>Item8</li><li>Item9</li><li>Item10</li>\n</ul>", "BulletStyle.Circle");
			b.BulletStyle = BulletStyle.Disc;
			Assert.AreEqual (b.Render (), "<ul style=\"list-style-type:disc;\">\n\t<li>Item1</li><li>Item2</li><li>Item3</li><li>Item4</li><li>Item5</li><li>Item6</li><li>Item7</li><li>Item8</li><li>Item9</li><li>Item10</li>\n</ul>", "BulletStyle.Disc");
			b.BulletStyle = BulletStyle.LowerAlpha;
			Assert.AreEqual (b.Render (), "<ol style=\"list-style-type:lower-alpha;\">\n\t<li>Item1</li><li>Item2</li><li>Item3</li><li>Item4</li><li>Item5</li><li>Item6</li><li>Item7</li><li>Item8</li><li>Item9</li><li>Item10</li>\n</ol>", "BulletStyle.LowerAlpha");
			b.BulletStyle = BulletStyle.Numbered;
			Assert.AreEqual (b.Render (), "<ol style=\"list-style-type:decimal;\">\n\t<li>Item1</li><li>Item2</li><li>Item3</li><li>Item4</li><li>Item5</li><li>Item6</li><li>Item7</li><li>Item8</li><li>Item9</li><li>Item10</li>\n</ol>", "BulletStyle.Numbered");
			b.BulletStyle = BulletStyle.UpperAlpha;
			Assert.AreEqual (b.Render (), "<ol style=\"list-style-type:upper-alpha;\">\n\t<li>Item1</li><li>Item2</li><li>Item3</li><li>Item4</li><li>Item5</li><li>Item6</li><li>Item7</li><li>Item8</li><li>Item9</li><li>Item10</li>\n</ol>", "BulletStyle.UpperAlpha");
			b.BulletStyle = BulletStyle.UpperRoman;
			Assert.AreEqual (b.Render (), "<ol style=\"list-style-type:upper-roman;\">\n\t<li>Item1</li><li>Item2</li><li>Item3</li><li>Item4</li><li>Item5</li><li>Item6</li><li>Item7</li><li>Item8</li><li>Item9</li><li>Item10</li>\n</ol>", "BulletStyle.UpperRoman");
			b.BulletStyle = BulletStyle.NotSet;
			Assert.AreEqual (b.Render (), "<ul>\n\t<li>Item1</li><li>Item2</li><li>Item3</li><li>Item4</li><li>Item5</li><li>Item6</li><li>Item7</li><li>Item8</li><li>Item9</li><li>Item10</li>\n</ul>", "BulletStyle.NotSet");
			b.BulletStyle = BulletStyle.CustomImage;
			b.BulletImageUrl = "Images/edit.gif";
			Assert.AreEqual (b.Render (), "<ul style=\"list-style-image:url(Images/edit.gif);\">\n\t<li>Item1</li><li>Item2</li><li>Item3</li><li>Item4</li><li>Item5</li><li>Item6</li><li>Item7</li><li>Item8</li><li>Item9</li><li>Item10</li>\n</ul>", "BulletStyle.CustomImage");
		}