コード例 #1
0
        public void Attribute_Count()
        {
            HtmlInputFilePoker p = new HtmlInputFilePoker();

            p.Accept    = "*.*";
            p.MaxLength = 50;
            p.Size      = 20;

            Assert.AreEqual(4, p.Attributes.Count, "A1");
        }
コード例 #2
0
        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");
        }
コード例 #3
0
ファイル: HtmlInputFileTest.cs プロジェクト: Profit0004/mono
		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");
		}
コード例 #4
0
        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");
        }
コード例 #5
0
ファイル: HtmlInputFileTest.cs プロジェクト: Profit0004/mono
		public void Attribute_Count ()
		{
			HtmlInputFilePoker p = new HtmlInputFilePoker ();

			p.Accept = "*.*";
			p.MaxLength = 50;
			p.Size = 20;

			Assert.AreEqual (4, p.Attributes.Count, "A1");
		}
コード例 #6
0
ファイル: HtmlInputFileTest.cs プロジェクト: Profit0004/mono
		public void ValueSetter ()
		{
			HtmlInputFilePoker p = new HtmlInputFilePoker ();
			p.Value = "/etc/passwd";
		}
コード例 #7
0
ファイル: HtmlInputFileTest.cs プロジェクト: Profit0004/mono
		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");
		}
コード例 #8
0
        public void ValueSetter()
        {
            HtmlInputFilePoker p = new HtmlInputFilePoker();

            p.Value = "/etc/passwd";
        }