public void RepeatLayoutException () { TestRadioButtonList r = new TestRadioButtonList (); Array a = Enum.GetValues (typeof (RepeatLayout)); int max = (int) a.GetValue (a.Length - 1) + 1; r.RepeatLayout = (RepeatLayout) max; }
public static void RaisePostDataChangedEvent_Init (Page p) { TestRadioButtonList r = new TestRadioButtonList (); r.ID = "RadioButtonList1"; r.Items.Add (new ListItem ("test", "test")); r.SelectedIndexChanged += new EventHandler (event_SelectedIndexChanged); p.Form.Controls.Add (r); }
public void CellSpacingProperties () { TestRadioButtonList r = new TestRadioButtonList (); r.CellSpacing = 5; Assert.AreEqual (5, r.CellSpacing, "setting"); string s = r.Render (); // FIXME: missing some info to start rendering ? Assert.AreEqual (String.Empty, s, "htmloutput"); }
public static void Render_Load (Page p) { LiteralControl lcb = new LiteralControl (HtmlDiff.BEGIN_TAG); LiteralControl lce = new LiteralControl (HtmlDiff.END_TAG); TestRadioButtonList c = new TestRadioButtonList (); p.Form.Controls.Add (lcb); p.Form.Controls.Add (c); p.Form.Controls.Add (lce); c.Items.Add (new ListItem ("text2", "value1")); }
public void Render() { TestRadioButtonList c = new TestRadioButtonList(); c.Items.Add(new ListItem("text2", "value1")); string s = c.Render(); Assert.IsTrue(s.ToLower().IndexOf(" type=\"radio\"") != -1, "type"); Assert.IsTrue(s.ToLower().IndexOf("value1") != -1, "value"); Assert.IsTrue(s.ToLower().IndexOf("text2") != -1, "text"); }
public void RadioButtonList_Constructor () { TestRadioButtonList r = new TestRadioButtonList (); Assert.AreEqual (-1, r.CellPadding, "A1"); Assert.AreEqual (-1, r.CellSpacing, "A2"); Assert.AreEqual (0, r.RepeatColumns, "A3"); Assert.AreEqual (RepeatDirection.Vertical, r.RepeatDirection, "A4"); Assert.AreEqual (RepeatLayout.Table, r.RepeatLayout, "A5"); Assert.AreEqual (TextAlign.Right, r.TextAlign, "A6"); Assert.AreEqual (false, ((IRepeatInfoUser)r).HasFooter, "A7"); Assert.AreEqual (false, ((IRepeatInfoUser)r).HasHeader, "A8"); Assert.AreEqual (false, ((IRepeatInfoUser)r).HasSeparators, "A9"); Assert.AreEqual (0, ((IRepeatInfoUser)r).RepeatedItemCount, "A10"); }
public void CellSpacingProperties() { TestRadioButtonList r = new TestRadioButtonList(); r.CellSpacing = 5; Assert.AreEqual(5, r.CellSpacing, "setting"); string s = r.Render(); #if NET_2_0 // FIXME: missing some info to start rendering ? Assert.AreEqual(String.Empty, s, "htmloutput"); #else Assert.IsTrue(s.ToLower().IndexOf("cellspacing=\"5\"") != -1, "htmloutput"); #endif }
public void RepeatDirectionException () { TestRadioButtonList r = new TestRadioButtonList (); r.RepeatDirection = (RepeatDirection) 4; }
public void RepeatColumnsException () { TestRadioButtonList r = new TestRadioButtonList (); r.RepeatColumns = -1; }
public void Render () { TestRadioButtonList c = new TestRadioButtonList (); c.Items.Add (new ListItem ("text2", "value1")); string s = c.Render (); Assert.IsTrue (s.ToLower ().IndexOf (" type=\"radio\"") != -1, "type"); Assert.IsTrue (s.ToLower ().IndexOf ("value1") != -1, "value"); Assert.IsTrue (s.ToLower ().IndexOf ("text2") != -1, "text"); }
public void CellSpacingProperties () { TestRadioButtonList r = new TestRadioButtonList (); r.CellSpacing = 5; Assert.AreEqual (5, r.CellSpacing, "setting"); string s = r.Render (); #if NET_2_0 // FIXME: missing some info to start rendering ? Assert.AreEqual (String.Empty, s, "htmloutput"); #else Assert.IsTrue (s.ToLower ().IndexOf ("cellspacing=\"5\"") != -1, "htmloutput"); #endif }
public void RepeatLayoutException() { TestRadioButtonList r = new TestRadioButtonList(); r.RepeatLayout = (RepeatLayout)3; }
public void RepeatLayoutException () { TestRadioButtonList r = new TestRadioButtonList (); r.RepeatLayout = (RepeatLayout) 3; }