protected void Gridview_sorting (object sender, GridViewSortEventArgs e)
{
sortingaction = true;
- }
-
- [Test]
- public void GridView_IsBindableType ()
- {
- PokerGridView g = new PokerGridView ();
- Assert.AreEqual (true, g.IsBindableType (typeof (Int32)), "test");
- Assert.AreEqual (false, g.IsBindableType (typeof (Enum)), "test");
- }
+ }\r
+\r
+ [Test]\r
+ public void GridView_IsBindableType ()\r
+ {\r
+ Type [] types = new Type [] {\r
+ typeof(Boolean), \r
+ typeof(Byte),\r
+ typeof(Char),\r
+ typeof(DateTime),\r
+ typeof(Decimal),\r
+ typeof(Double),\r
+ typeof(Guid),\r
+ typeof(Int16),\r
+ typeof(Int32),\r
+ typeof(Int64),\r
+ typeof(SByte),\r
+ typeof(Single),\r
+ typeof(String),\r
+ typeof(UInt16),\r
+ typeof(UInt32),\r
+ typeof(UInt64)\r
+ };\r
+\r
+ GridView g = new GridView ();\r
+ foreach (Type type in types)\r
+ Assert.AreEqual (true, g.IsBindableType (type), type.ToString ());\r
+\r
+ Assert.AreEqual (false, g.IsBindableType (typeof (Enum)), "test");\r
+ Assert.AreEqual (false, g.IsBindableType (typeof (Object)), "test");\r
+ }\r
[Test]
public void GridView_CreateAutoGeneratedColumn ()
[TestFixtureSetUp]\r
public void SetUp ()\r
{\r
+#if VISUAL_STUDIO\r
+ WebTest.CopyResource (GetType (), "MonoTests.System.Web.UI.WebControls.Resources.NoEventValidation.aspx", "NoEventValidation.aspx");\r
+#else\r
WebTest.CopyResource (GetType (), "NoEventValidation.aspx", "NoEventValidation.aspx");\r
+#endif\r
}\r
\r
\r