public static void _postback(Page p) { p.EnableEventValidation = false; Wizard w = new Wizard(); w.ID = "Wizard"; PokerWizardStepBase ws = new PokerWizardStepBase(); ws.ID = "step"; ws.StepType = WizardStepType.Start; ws.Controls.Add(new LiteralControl("StartType")); ws.AllowReturn = false; PokerWizardStepBase ws1 = new PokerWizardStepBase(); ws1.ID = "step1"; ws1.StepType = WizardStepType.Step; ws1.Controls.Add(new LiteralControl("StepType")); w.DisplaySideBar = true; w.WizardSteps.Add(ws); w.WizardSteps.Add(ws1); p.Controls.Add(w); }
public void WizardStepBase_AssignProperty() { PokerWizardStepBase step = new PokerWizardStepBase(); Wizard w = new Wizard(); Assert.AreEqual(0, step.StateBag.Count, "ViewState.Count"); w.WizardSteps.Add(step); Assert.AreEqual(w, step.Wizard, "Wizard"); step.EnableTheming = false; Assert.AreEqual(false, step.EnableTheming, "EnableTheming"); step.ID = "test"; Assert.AreEqual("test", step.ID, "ID"); step.Title = "test"; Assert.AreEqual("test", step.Title, "Title"); step.AllowReturn = false; Assert.AreEqual(false, step.AllowReturn, "AllowReturn"); step.StepType = WizardStepType.Complete; Assert.AreEqual(WizardStepType.Complete, step.StepType, "StepType"); }
public static void Render_Test(Page p) { LiteralControl lcb = new LiteralControl(HtmlDiff.BEGIN_TAG); LiteralControl lce = new LiteralControl(HtmlDiff.END_TAG); Wizard w = new Wizard(); PokerWizardStepBase ws = new PokerWizardStepBase(); ws.Title = "my_title"; ws.Controls.Add(new LiteralControl("123")); ws.StepType = WizardStepType.Start; PokerWizardStepBase ws2 = new PokerWizardStepBase(); ws2.Title = "my_title_2"; ws2.Controls.Add(new LiteralControl("1234567")); ws2.StepType = WizardStepType.Finish; w.DisplaySideBar = true; w.WizardSteps.Add(ws); w.WizardSteps.Add(ws2); p.Form.Controls.Add(lcb); p.Form.Controls.Add(w); p.Form.Controls.Add(lce); }
public void WizardStepBase_ID() { Wizard w = new Wizard(); PokerWizardStepBase step = new PokerWizardStepBase(); step.ID = "step1"; w.WizardSteps.Add(step); Assert.AreEqual(step, w.FindControl("step1"), "Step with ID fail"); }
public void WizardStepBase_RenderChildren() { Wizard w = new Wizard(); PokerWizardStepBase step = new PokerWizardStepBase(); LiteralControl lc = new LiteralControl("test"); step.Controls.Add(lc); w.WizardSteps.Add(step); Assert.AreEqual("test", step.RenderChildren(), "RenderChildren"); }
public void WizardStepBase_LoadEvent() { Wizard w = new Wizard(); PokerWizardStepBase step = new PokerWizardStepBase(); w.WizardSteps.Add(step); step.Load += new EventHandler(eventchecker); step.DoOnLoad(new EventArgs()); eventassert("OnLoadEvent"); }
public static void notheme(Page p) { Wizard w = new Wizard(); PokerWizardStepBase ws = new PokerWizardStepBase(); ws.Controls.Add(new Button()); ws.EnableTheming = false; ws.SkinID = "WizardTest"; w.WizardSteps.Add(ws); p.Form.Controls.Add(w); }
public void WizardStepBase_DefaultProperty() { PokerWizardStepBase step = new PokerWizardStepBase(); Assert.AreEqual(true, step.AllowReturn, "AllowReturn"); Assert.AreEqual(true, step.EnableTheming, "EnableTheming"); Assert.AreEqual(null, step.ID, "ID"); Assert.AreEqual(WizardStepType.Auto, step.StepType, "StepType"); Assert.AreEqual("", step.Title, "Title"); Assert.AreEqual(null, step.Wizard, "Wizard"); }
public void WizardStepBase_StateBag() { PokerWizardStepBase step = new PokerWizardStepBase(); Wizard w = new Wizard(); step.StepType = WizardStepType.Complete; Assert.AreEqual(WizardStepType.Complete, step.StepType, "StepType"); Assert.AreEqual(1, step.StateBag.Count, "StepTypeStateBag"); step.AllowReturn = false; Assert.AreEqual(false, step.AllowReturn, "AllowReturn"); Assert.AreEqual(2, step.StateBag.Count, "AllowReturnStateBag"); step.Title = "test"; Assert.AreEqual("test", step.Title, "Title"); Assert.AreEqual(3, step.StateBag.Count, "Title"); }
public void WizardStepBase_LoadViewState() { PokerWizardStepBase step = new PokerWizardStepBase(); PokerWizardStepBase copy = new PokerWizardStepBase(); step.AllowReturn = false; Assert.AreEqual(false, step.AllowReturn, "AllowReturn"); Assert.AreEqual(1, step.StateBag.Count, "AllowReturnStateBag"); step.StepType = WizardStepType.Complete; Assert.AreEqual(WizardStepType.Complete, step.StepType, "StepType"); Assert.AreEqual(2, step.StateBag.Count, "StepTypeStateBag"); object state = step.SaveState(); copy.LoadState(state); Assert.AreEqual(false, copy.AllowReturn, "AllowReturn"); Assert.AreEqual(WizardStepType.Complete, copy.StepType, "StepType"); }
public void WizardStepBase_ID () { Wizard w = new Wizard (); PokerWizardStepBase step = new PokerWizardStepBase (); step.ID = "step1"; w.WizardSteps.Add (step); Assert.AreEqual (step, w.FindControl ("step1"), "Step with ID fail"); }
public void WizardStepBase_RenderChildren () { Wizard w = new Wizard (); PokerWizardStepBase step = new PokerWizardStepBase (); LiteralControl lc = new LiteralControl ("test"); step.Controls.Add (lc); w.WizardSteps.Add (step); Assert.AreEqual ("test", step.RenderChildren (), "RenderChildren"); }
public void WizardStepBase_LoadEvent () { Wizard w = new Wizard (); PokerWizardStepBase step = new PokerWizardStepBase (); w.WizardSteps.Add (step); step.Load += new EventHandler (eventchecker); step.DoOnLoad (new EventArgs ()); eventassert ("OnLoadEvent"); }
public void WizardStepBase_LoadViewState () { PokerWizardStepBase step = new PokerWizardStepBase (); PokerWizardStepBase copy = new PokerWizardStepBase (); step.AllowReturn = false; Assert.AreEqual (false, step.AllowReturn, "AllowReturn"); Assert.AreEqual (1, step.StateBag.Count, "AllowReturnStateBag"); step.StepType = WizardStepType.Complete; Assert.AreEqual (WizardStepType.Complete, step.StepType, "StepType"); Assert.AreEqual (2, step.StateBag.Count, "StepTypeStateBag"); object state = step.SaveState (); copy.LoadState (state); Assert.AreEqual (false, copy.AllowReturn, "AllowReturn"); Assert.AreEqual (WizardStepType.Complete, copy.StepType, "StepType"); }
public void WizardStepBase_StateBag () { PokerWizardStepBase step = new PokerWizardStepBase (); Wizard w = new Wizard (); step.StepType = WizardStepType.Complete; Assert.AreEqual (WizardStepType.Complete, step.StepType, "StepType"); Assert.AreEqual (1, step.StateBag.Count, "StepTypeStateBag"); step.AllowReturn = false; Assert.AreEqual (false, step.AllowReturn, "AllowReturn"); Assert.AreEqual (2, step.StateBag.Count, "AllowReturnStateBag"); step.Title = "test"; Assert.AreEqual ("test", step.Title, "Title"); Assert.AreEqual (3, step.StateBag.Count, "Title"); }
public void WizardStepBase_AssignProperty () { PokerWizardStepBase step = new PokerWizardStepBase (); Wizard w = new Wizard (); Assert.AreEqual (0, step.StateBag.Count, "ViewState.Count"); w.WizardSteps.Add (step); Assert.AreEqual (w, step.Wizard, "Wizard"); step.EnableTheming = false; Assert.AreEqual (false, step.EnableTheming, "EnableTheming"); step.ID = "test"; Assert.AreEqual ("test", step.ID, "ID"); step.Title = "test"; Assert.AreEqual ("test", step.Title, "Title"); step.AllowReturn = false; Assert.AreEqual (false, step.AllowReturn, "AllowReturn"); step.StepType = WizardStepType.Complete; Assert.AreEqual (WizardStepType.Complete, step.StepType, "StepType"); }
public static void notheme (Page p) { Wizard w = new Wizard (); PokerWizardStepBase ws = new PokerWizardStepBase (); ws.Controls.Add (new Button ()); ws.EnableTheming = false; ws.SkinID = "WizardTest"; w.WizardSteps.Add (ws); p.Form.Controls.Add (w); }
public static void Render_Test (Page p) { LiteralControl lcb = new LiteralControl (HtmlDiff.BEGIN_TAG); LiteralControl lce = new LiteralControl (HtmlDiff.END_TAG); Wizard w = new Wizard (); PokerWizardStepBase ws = new PokerWizardStepBase (); ws.Title = "my_title"; ws.Controls.Add (new LiteralControl ("123")); ws.StepType = WizardStepType.Start; PokerWizardStepBase ws2 = new PokerWizardStepBase (); ws2.Title = "my_title_2"; ws2.Controls.Add (new LiteralControl ("1234567")); ws2.StepType = WizardStepType.Finish; w.DisplaySideBar = true; w.WizardSteps.Add (ws); w.WizardSteps.Add (ws2); p.Form.Controls.Add (lcb); p.Form.Controls.Add (w); p.Form.Controls.Add (lce); }
public static void _postback (Page p) { p.EnableEventValidation = false; Wizard w = new Wizard (); w.ID = "Wizard"; PokerWizardStepBase ws = new PokerWizardStepBase (); ws.ID = "step"; ws.StepType = WizardStepType.Start; ws.Controls.Add (new LiteralControl ("StartType")); ws.AllowReturn = false; PokerWizardStepBase ws1 = new PokerWizardStepBase (); ws1.ID = "step1"; ws1.StepType = WizardStepType.Step; ws1.Controls.Add (new LiteralControl ("StepType")); w.DisplaySideBar = true; w.WizardSteps.Add (ws); w.WizardSteps.Add (ws1); p.Controls.Add (w); }
public void WizardStepBase_DefaultPropertyNotWorking () { PokerWizardStepBase step = new PokerWizardStepBase (); Assert.AreEqual (null, step.Name, "Name"); }
public void WizardStepBase_DefaultProperty () { PokerWizardStepBase step = new PokerWizardStepBase (); Assert.AreEqual (true, step.AllowReturn, "AllowReturn"); Assert.AreEqual (true, step.EnableTheming, "EnableTheming"); Assert.AreEqual (null, step.ID, "ID"); Assert.AreEqual (WizardStepType.Auto, step.StepType, "StepType"); Assert.AreEqual ("", step.Title, "Title"); Assert.AreEqual (null, step.Wizard, "Wizard"); }
public void WizardStepBase_DefaultPropertyNotWorking() { PokerWizardStepBase step = new PokerWizardStepBase(); Assert.AreEqual(null, step.Name, "Name"); }