public void HtmlEncodeValues() { TestHtmlSelect s = new TestHtmlSelect(); s.DataSource = new string [] { "&", "<" }; s.DataBind(); string exp = @"<select name> <option value=""&"">&</option> <option value=""<""><</option> </select>"; HtmlDiff.AssertAreEqual(exp, s.Render(), "HtmlEncodeValues"); }
public void DataBind3() { TestHtmlSelect s = new TestHtmlSelect(); s.DataSource = new string [] { "A", "B", "C" }; s.DataBind(); string exp = @"<select name> <option value=""A"">A</option> <option value=""B"">B</option> <option value=""C"">C</option> </select>"; HtmlDiff.AssertAreEqual(exp, s.Render(), "DataBind3"); }
public void DataBind1() { TestHtmlSelect s = new TestHtmlSelect(); s.DataSource = GetExampleData(); s.DataTextField = "Symbol"; s.DataBind(); string exp = @"<select name> <option value=""NOVL"">NOVL</option> <option value=""MSFT"">MSFT</option> <option value=""GOOG"">GOOG</option> </select>"; HtmlDiff.AssertAreEqual(exp, s.Render(), "DataBind1"); }
public void DataBind2() { TestHtmlSelect s = new TestHtmlSelect(); s.DataSource = GetExampleDataWithEmpty(); s.DataTextField = "Company"; s.DataValueField = "Symbol"; s.DataBind(); string exp = @"<select name> <option value=""NOVL"">Novell Inc.</option> <option value=""MSFT""></option> <option value=""GOOG"">Google</option> </select>"; HtmlDiff.AssertAreEqual(exp, s.Render(), "DataBind2"); }
public void HtmlEncodeValues () { TestHtmlSelect s = new TestHtmlSelect (); s.DataSource = new string [] { "&", "<" }; s.DataBind (); string exp = @"<select name> <option value=""&"">&</option> <option value=""<""><</option> </select>"; HtmlDiff.AssertAreEqual (exp, s.Render (), "HtmlEncodeValues"); }
public void DataBindDoubleCall () { TestHtmlSelect s = new TestHtmlSelect (); s.DataSource = new string [] { "A", "B", "C" }; s.DataBind (); s.DataBind (); string exp = @"<select name> <option value=""A"">A</option> <option value=""B"">B</option> <option value=""C"">C</option> </select>"; HtmlDiff.AssertAreEqual (exp, s.Render (), "DataBindDoubleCall"); }
public void DataBind2 () { TestHtmlSelect s = new TestHtmlSelect (); s.DataSource = GetExampleDataWithEmpty (); s.DataTextField = "Company"; s.DataValueField = "Symbol"; s.DataBind (); string exp = @"<select name> <option value=""NOVL"">Novell Inc.</option> <option value=""MSFT""></option> <option value=""GOOG"">Google</option> </select>"; HtmlDiff.AssertAreEqual (exp, s.Render (), "DataBind2"); }
public void DataBind1 () { TestHtmlSelect s = new TestHtmlSelect (); s.DataSource = GetExampleData (); s.DataTextField = "Symbol"; s.DataBind (); string exp = @"<select name> <option value=""NOVL"">NOVL</option> <option value=""MSFT"">MSFT</option> <option value=""GOOG"">GOOG</option> </select>"; HtmlDiff.AssertAreEqual (exp, s.Render (), "DataBind1"); }