Exemplo n.º 1
0
        public static void OpenFile_Load(Page p)
        {
            DerivedControl ctrl  = new DerivedControl();
            Stream         strem = ctrl.OpenFile("~/MyPage.aspx");

            Assert.IsNotNull(strem, "OpenFile failed");
        }
Exemplo n.º 2
0
        public void EnableTheming()
        {
            DerivedControl ctrl = new DerivedControl();

            Assert.AreEqual(true, ctrl.EnableTheming, "EnableTheming#1");
            ctrl.EnableTheming = false;
            Assert.AreEqual(false, ctrl.EnableTheming, "EnableTheming#2");
        }
Exemplo n.º 3
0
        public void IsViewStateEnabled()
        {
            DerivedControl c = new DerivedControl();

            Assert.IsTrue(c.DoIsViewStateEnabled);
            Page p = new Page();

            c.Page = p;
            p.Controls.Add(c);
            Assert.IsTrue(c.DoIsViewStateEnabled);
            p.EnableViewState = false;
            Assert.IsFalse(c.DoIsViewStateEnabled);
        }
Exemplo n.º 4
0
        public void Controls1()
        {
            DerivedControl derived = new DerivedControl();

            derived.Controls.Add(new LiteralControl("hola"));
            StringWriter   sw  = new StringWriter();
            HtmlTextWriter htw = new HtmlTextWriter(sw);

            derived.RenderControl(htw);
            string result = sw.ToString();

            Assert.AreEqual("", result, "#01");
        }
Exemplo n.º 5
0
		public void EnableTheming ()
		{
			DerivedControl ctrl = new DerivedControl ();
			Assert.AreEqual (true, ctrl.EnableTheming, "EnableTheming#1");
			ctrl.EnableTheming = false;
			Assert.AreEqual (false, ctrl.EnableTheming, "EnableTheming#2");
		}
Exemplo n.º 6
0
		[Category ("NotWorking")] // Not implemented exception
		public void ResolveAdapter_2 ()
		{
			DerivedControl ctrl = new DerivedControl ();
			Assert.AreEqual (null, ctrl.ResolveAdapter (), "ResolveAdapter");
		}
Exemplo n.º 7
0
		public static void OpenFileException_Load (Page p)
		{
			DerivedControl ctrl = new DerivedControl ();
			Stream strem = ctrl.OpenFile ("~/Fake.tmp");
		}
Exemplo n.º 8
0
		public static void OpenFile_Load (Page p)
		{
			DerivedControl ctrl = new DerivedControl ();
			Stream strem = ctrl.OpenFile ("~/MyPage.aspx");
			Assert.IsNotNull (strem, "OpenFile failed");
		}
Exemplo n.º 9
0
		public void IDSeparator ()
		{
			DerivedControl ctrl = new DerivedControl ();
			Assert.AreEqual (36, (int) ctrl.IdSeparator, "IDSeparator");
		}
Exemplo n.º 10
0
		public void ClientIDSeparator ()
		{
			DerivedControl ctrl = new DerivedControl ();
			Assert.AreEqual (95, (int) ctrl.ClientIDSeparator, "ClientIDSeparator");
		}
Exemplo n.º 11
0
		public void IsViewStateEnabled ()
		{
			DerivedControl c = new DerivedControl ();
			Assert.IsTrue (c.DoIsViewStateEnabled);
			Page p = new Page ();
			c.Page = p;
			p.Controls.Add (c);
			Assert.IsTrue (c.DoIsViewStateEnabled);
			p.EnableViewState = false;
			Assert.IsFalse (c.DoIsViewStateEnabled);
		}
Exemplo n.º 12
0
		public void Controls1 ()
		{
			DerivedControl derived = new DerivedControl ();
			derived.Controls.Add (new LiteralControl ("hola"));
			StringWriter sw = new StringWriter ();
			HtmlTextWriter htw = new HtmlTextWriter (sw);
			derived.RenderControl (htw);
			string result = sw.ToString ();
			Assert.AreEqual ("", result, "#01");
		}
Exemplo n.º 13
0
 public static void OpenFileException_Load(Page p)
 {
     DerivedControl ctrl  = new DerivedControl();
     Stream         strem = ctrl.OpenFile("~/Fake.tmp");
 }
Exemplo n.º 14
0
        public void IDSeparator()
        {
            DerivedControl ctrl = new DerivedControl();

            Assert.AreEqual(36, (int)ctrl.IdSeparator, "IDSeparator");
        }
Exemplo n.º 15
0
        public void ClientIDSeparator()
        {
            DerivedControl ctrl = new DerivedControl();

            Assert.AreEqual(95, (int)ctrl.ClientIDSeparator, "ClientIDSeparator");
        }
Exemplo n.º 16
0
        [Category("NotWorking")]          // Not implemented exception
        public void ResolveAdapter_2()
        {
            DerivedControl ctrl = new DerivedControl();

            Assert.AreEqual(null, ctrl.ResolveAdapter(), "ResolveAdapter");
        }