public void RenderWithoutPageTest () { PokerFileUpload fu = new PokerFileUpload (); using (StringWriter sw = new StringWriter ()) { using (HtmlTextWriter htw = new HtmlTextWriter (sw)) { fu.DoRender (htw); } sw.Close (); string res = sw.ToString (); Assert.AreEqual ("<input type=\"file\" />", res); } }
public void RenderWithPageTest () { PokerFileUpload fu = new PokerFileUpload (); fu.Page = new Page (); fu.Page.Controls.Add (fu); using (StringWriter sw = new StringWriter ()) { using (HtmlTextWriter htw = new HtmlTextWriter (sw)) { fu.DoRender (htw); } sw.Close (); } }
public void RenderWithoutPageTest() { PokerFileUpload fu = new PokerFileUpload(); using (StringWriter sw = new StringWriter()) { using (HtmlTextWriter htw = new HtmlTextWriter(sw)) { fu.DoRender(htw); } sw.Close(); string res = sw.ToString(); Assert.AreEqual("<input type=\"file\" />", res); } }
public void RenderWithPageTest() { PokerFileUpload fu = new PokerFileUpload(); fu.Page = new Page(); fu.Page.Controls.Add(fu); using (StringWriter sw = new StringWriter()) { using (HtmlTextWriter htw = new HtmlTextWriter(sw)) { fu.DoRender(htw); } sw.Close(); } }