public void Attribute_Count() { HtmlInputFilePoker p = new HtmlInputFilePoker(); p.Accept = "*.*"; p.MaxLength = 50; p.Size = 20; Assert.AreEqual(4, p.Attributes.Count, "A1"); }
public void RenderAttributes() { StringWriter sw = new StringWriter(); HtmlTextWriter tw = new HtmlTextWriter(sw); HtmlInputFilePoker p = new HtmlInputFilePoker(); p.DoRenderAttributes(tw); Assert.AreEqual(" name type=\"file\" /", sw.ToString(), "A1"); }
public void Defaults () { HtmlInputFilePoker p = new HtmlInputFilePoker (); /* MS throws a null exception on both * get_PostedFile and get_Value in this test, * which makes me think (in the PostedFile * case at least) they're directly accessing * Page.Request.Files (which our test doesn't * support) */ Assert.AreEqual ("", p.Accept, "A1"); Assert.AreEqual (-1, p.MaxLength, "A2"); //Assert.IsNull (p.PostedFile, "A3"); Assert.AreEqual (-1, p.Size, "A4"); //Assert.AreEqual ("", p.Value, "A5"); }
public void Defaults() { HtmlInputFilePoker p = new HtmlInputFilePoker(); /* MS throws a null exception on both * get_PostedFile and get_Value in this test, * which makes me think (in the PostedFile * case at least) they're directly accessing * Page.Request.Files (which our test doesn't * support) */ Assert.AreEqual("", p.Accept, "A1"); Assert.AreEqual(-1, p.MaxLength, "A2"); //Assert.IsNull (p.PostedFile, "A3"); Assert.AreEqual(-1, p.Size, "A4"); //Assert.AreEqual ("", p.Value, "A5"); }
public void Attribute_Count () { HtmlInputFilePoker p = new HtmlInputFilePoker (); p.Accept = "*.*"; p.MaxLength = 50; p.Size = 20; Assert.AreEqual (4, p.Attributes.Count, "A1"); }
public void ValueSetter () { HtmlInputFilePoker p = new HtmlInputFilePoker (); p.Value = "/etc/passwd"; }
public void RenderAttributes () { StringWriter sw = new StringWriter (); HtmlTextWriter tw = new HtmlTextWriter (sw); HtmlInputFilePoker p = new HtmlInputFilePoker (); p.DoRenderAttributes (tw); Assert.AreEqual (" name type=\"file\" /", sw.ToString (), "A1"); }
public void ValueSetter() { HtmlInputFilePoker p = new HtmlInputFilePoker(); p.Value = "/etc/passwd"; }