Example #1
0
        public static void LoadTemplateTest(Page p)
        {
            PokerTemplateControl t   = new PokerTemplateControl();
            ITemplate            tmp = t.LoadTemplate("TemplateUserControl.ascx");

            tmp.InstantiateIn(p.Form);
        }
Example #2
0
        public void TemplateControl_Construct()
        {
            eventchecker = false;
            PokerTemplateControl t = new PokerTemplateControl();

            Assert.AreEqual(true, eventchecker, "Construct Failed");
        }
Example #3
0
        public void TemplateControl_TemplateControl()
        {
            Assert.IsNull(new Control().TemplateControl);
            PokerTemplateControl t = new PokerTemplateControl();

            Assert.AreEqual(t, t.TemplateControl);
        }
Example #4
0
        public void TemplateControl_EvalException()
        {
            PokerTemplateControl t = new PokerTemplateControl();

            t.Page = new Page();
            t.DoEval(null);
        }
Example #5
0
        public void TemplateControl_DefaultProperty()
        {
            PokerTemplateControl t = new PokerTemplateControl();

            Assert.AreEqual(true, t.EnableTheming, "EnableTheming");
            Assert.AreEqual(true, t.DoSupportAutoEvents, "SupportAutoEvents");
        }
Example #6
0
        public void TemplateControl_CommitTransaction()
        {
            PokerTemplateControl t = new PokerTemplateControl();

            t.CommitTransaction += new EventHandler(t_CommitTransaction);
            Assert.AreEqual(false, commitTransaction, "Before transaction Commited");
            t.DoOnCommitTransaction(new EventArgs());
            Assert.AreEqual(true, commitTransaction, "After transaction Commited");
        }
Example #7
0
        public void TemplateControl_Error()
        {
            PokerTemplateControl t = new PokerTemplateControl();

            t.Error += new EventHandler(t_Error);
            Assert.AreEqual(false, error, "Before error");
            t.DoOnError(new EventArgs());
            Assert.AreEqual(true, error, "After error");
        }
Example #8
0
        public static void ParseControlTest(Page p)
        {
            PokerTemplateControl t = new PokerTemplateControl();
            //Does not have definition , must be uncommented
            //t.AppRelativeVirtualPath = "~\\";
            Control c = t.ParseControl("<asp:label id='lb' runat='server' text='test' />");

            p.Controls.Add(c);
        }
Example #9
0
		public void TemplateControl_TemplateControl ()
		{
			Assert.IsNull (new Control ().TemplateControl);
			PokerTemplateControl t = new PokerTemplateControl ();
			Assert.AreEqual (t, t.TemplateControl);
		}
Example #10
0
		public void TemplateControl_Construct ()
		{
			eventchecker = false;	
			PokerTemplateControl t = new PokerTemplateControl ();
			Assert.AreEqual (true, eventchecker, "Construct Failed");
		}
Example #11
0
		public static void ParseControlTest (Page p)
		{
			PokerTemplateControl t = new PokerTemplateControl ();
			//Does not have definition , must be uncommented
			//t.AppRelativeVirtualPath = "~\\";
			Control c = t.ParseControl ("<asp:label id='lb' runat='server' text='test' />");
			p.Controls.Add(c);
		}
Example #12
0
		public static void LoadTemplateTest (Page p)
		{
			PokerTemplateControl t = new PokerTemplateControl ();
			ITemplate tmp = t.LoadTemplate ("TemplateUserControl.ascx");
			tmp.InstantiateIn (p.Form);
		}
Example #13
0
		public static void LoadControlTest (Page p)
		{
			PokerTemplateControl t = new PokerTemplateControl ();
			p.Form.Controls.Add (t.LoadControl ("TemplateUserControl.ascx"));
		}
Example #14
0
		public void TemplateControl_DefaultProperty ()
		{
			PokerTemplateControl t = new PokerTemplateControl ();
			Assert.AreEqual (true, t.EnableTheming, "EnableTheming");
			Assert.AreEqual (true, t.DoSupportAutoEvents, "SupportAutoEvents");
		}
Example #15
0
        public void TemplateControl_AppRelativeVirtualPathException2()
        {
            PokerTemplateControl t = new PokerTemplateControl();

            t.AppRelativeVirtualPath = "fake";
        }
		public void TemplateControl_AppRelativeVirtualPathException2 ()
		{
			PokerTemplateControl t = new PokerTemplateControl ();
			t.AppRelativeVirtualPath = "fake";
		}
		public void TemplateControl_AppRelativeVirtualPathException1 ()
		{
			PokerTemplateControl t = new PokerTemplateControl ();
			t.AppRelativeVirtualPath = null;
		}
Example #18
0
		public void TemplateControl_EvalException ()
		{
			PokerTemplateControl t = new PokerTemplateControl ();
			t.Page = new Page ();
			t.DoEval (null);
		}
Example #19
0
        public void TemplateControl_DefaultPropertyNotWorking()
        {
            PokerTemplateControl t = new PokerTemplateControl();

            Assert.AreEqual(null, t.AppRelativeVirtualPath, "AppRelativeVirtualPath");
        }
Example #20
0
        public void TemplateControl_AppRelativeVirtualPathException1()
        {
            PokerTemplateControl t = new PokerTemplateControl();

            t.AppRelativeVirtualPath = null;
        }
Example #21
0
		public void TemplateControl_CommitTransaction ()
		{
			PokerTemplateControl t = new PokerTemplateControl ();
			t.CommitTransaction += new EventHandler (t_CommitTransaction);
			Assert.AreEqual (false, commitTransaction, "Before transaction Commited");
			t.DoOnCommitTransaction (new EventArgs ());
			Assert.AreEqual (true, commitTransaction, "After transaction Commited");
		}
Example #22
0
        public void TemplateControl_LoadControlException()
        {
            PokerTemplateControl t = new PokerTemplateControl();

            t.LoadControl(null);
        }
Example #23
0
		public void TemplateControl_Error ()
		{
			PokerTemplateControl t = new PokerTemplateControl ();
			t.Error += new EventHandler (t_Error);
			Assert.AreEqual (false, error, "Before error");
			t.DoOnError (new EventArgs ());
			Assert.AreEqual (true, error, "After error");
		}
Example #24
0
        public static void LoadControlTest(Page p)
        {
            PokerTemplateControl t = new PokerTemplateControl();

            p.Form.Controls.Add(t.LoadControl("TemplateUserControl.ascx"));
        }
Example #25
0
		public void TemplateControl_LoadControlException()
		{
			PokerTemplateControl t = new PokerTemplateControl ();
			t.LoadControl (null);
		}
		public void TemplateControl_DefaultPropertyNotWorking ()
		{
			PokerTemplateControl t = new PokerTemplateControl ();
			Assert.AreEqual (null, t.AppRelativeVirtualPath, "AppRelativeVirtualPath");
		}