Example #1
0
        public void EmptySrc()
        {
            TestHtmlImage img = new TestHtmlImage();

            img.Src = String.Empty;

            HtmlTextWriter writer = img.GetWriter();

            Assert.AreEqual(" /", writer.InnerWriter.ToString());
        }
Example #2
0
        public static void DoRenderAttributes(Page p)
        {
            TestHtmlImage img = new TestHtmlImage();

            img.Align  = "*1*";
            img.Alt    = "*2*";
            img.Border = 3;
            img.Height = 4;
            img.Src    = "*5<&*";
            img.Width  = 6;

            Assert.AreEqual(6, img.Attributes.Count, "Attributes.Count");

            HtmlTextWriter writer = img.GetWriter();

            Assert.AreEqual(" src=\"*5<&*\" align=\"*1*\" alt=\"*2*\" border=\"3\" height=\"4\" width=\"6\" /", writer.InnerWriter.ToString());
        }
Example #3
0
		public static void DoRenderAttributes (Page p)
		{
			TestHtmlImage img = new TestHtmlImage ();

			img.Align = "*1*";
			img.Alt = "*2*";
			img.Border = 3;
			img.Height = 4;
			img.Src = "*5<&*";
			img.Width = 6;
			
			Assert.AreEqual (6, img.Attributes.Count, "Attributes.Count");

			HtmlTextWriter writer = img.GetWriter ();
			Assert.AreEqual (" src=\"*5<&*\" align=\"*1*\" alt=\"*2*\" border=\"3\" height=\"4\" width=\"6\" /", writer.InnerWriter.ToString ());
		}
Example #4
0
		public void EmptySrc ()
		{
			TestHtmlImage img = new TestHtmlImage ();

			img.Src = String.Empty;

			HtmlTextWriter writer = img.GetWriter ();
			Assert.AreEqual (" /", writer.InnerWriter.ToString ());
		}