Author: igorz
Date: 2006-12-11 05:33:18 -0500 (Mon, 11 Dec 2006)
New Revision: 69307
Modified:
trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/ChangeLog
trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/GridViewTest.cs
Log:
2006-12-11 Igor Zelmanovich <[EMAIL PROTECTED]>
* GridViewTest.cs: fixed tests, removed NotWorking attribute.
Modified: trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/ChangeLog
2006-12-11 10:30:57 UTC (rev 69306)
+++ trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/ChangeLog
2006-12-11 10:33:18 UTC (rev 69307)
@@ -1,5 +1,9 @@
2006-12-11 Igor Zelmanovich <[EMAIL PROTECTED]>
+ * GridViewTest.cs: fixed tests, removed NotWorking attribute.
+
+2006-12-11 Igor Zelmanovich <[EMAIL PROTECTED]>
+
* RadioButtonTest.cs: added tests.
2006-12-10 Igor Zelmanovich <[EMAIL PROTECTED]>
Modified:
trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/GridViewTest.cs
===================================================================
--- trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/GridViewTest.cs
2006-12-11 10:30:57 UTC (rev 69306)
+++ trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/GridViewTest.cs
2006-12-11 10:33:18 UTC (rev 69307)
@@ -344,12 +344,6 @@
ArrayList myds = new ArrayList ();
public bool InitilizePager;
- [SetUp]
- public void SetupTestCase ()
- {
- Thread.Sleep (100);
- }
-
[TestFixtureSetUp]
public void GridViewInit ()
{
@@ -2038,8 +2032,6 @@
if (pageHTML.IndexOf ("DeleteSuccess") < 0) {
Assert.Fail ("DeleteFail");
}
-
- Unload();
}
[Test]
@@ -2064,8 +2056,6 @@
t.Request = fr;
pageHTML = t.Run ();
Assert.AreEqual (0, t.UserData , "ObjectDataSource
after delete from grid");
-
- Unload();
}
public static void GridView_checkrows (Page p)
@@ -2105,27 +2095,8 @@
[Test]
[Category ("NunitWeb")]
- [Category("NotWorking")]
public void GridView_PostBackUpdateItem ()
- {
-
- //
- // This test fails because:
-//2)
MonoTests.System.Web.UI.WebControls.GridViewTest.GridView_PostBackUpdateItem :
NUnit.Framework.AssertionException: Update button not been createdIndex is less
than 0 or more than or equal to the list count.
-//Parameter name: index
-//0
-// at NUnit.Framework.Assert.Fail (System.String message, System.Object[]
args) [0x00000]
-// at NUnit.Framework.Assert.Fail (System.String message) [0x00000]
-// at
MonoTests.System.Web.UI.WebControls.GridViewTest.GridView_checkrowsupdate
(System.Web.UI.Page p) [0x00000]
-// at (wrapper delegate-invoke) System.MulticastDelegate:invoke_void_Page
(System.Web.UI.Page)
-// at MonoTests.SystemWeb.Framework.PageInvoker.Invoke
(MonoTests.SystemWeb.Framework.PageDelegate callback) [0x00000]
-// ----> NUnit.Framework.AssertionException : Update button not been
createdIndex is less than 0 or more than or equal to the list count.Parameter
name: index
-//0^M
-// at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke
(System.Runtime.Remoting.Proxies.RealProxy rp, IMessage msg, System.Exception&
exc, System.Object[]& out_args) [0x00188] in
/home/cvs/mcs/class/corlib/System.Runtime.Remoting.Proxies/RealProxy.cs:221
-//--AssertionException
-// at
MonoTests.System.Web.UI.WebControls.GridViewTest.GridView_checkrowsupdate
(System.Web.UI.Page p) [0x00000]
-// at (wrapper delegate-invoke) System.MulticastDelegate:invoke_void_Page
(System.Web.UI.Page) at MonoTests.SystemWeb.Framework.PageInvoker.Invoke
(MonoTests.SystemWeb.Framework.PageDelegate callback) [0x00000] Tests not run:
-//
+ {
WebTest t = new WebTest ();
PageDelegates pd = new PageDelegates ();
pd.Load = GridView_postbackupdateitem;
@@ -2182,11 +2153,13 @@
Assert.AreEqual ("1001", merged_data[1], "Row before
update#1");
Assert.AreEqual ("TestEname", merged_data[2], "Row
before update#2");
Assert.AreEqual ("TestLname", merged_data[3], "Row
before update#3");
- Unload();
}
public static void GridView_postbackupdateitem (Page p)
- {
+ {
+ if (!p.IsPostBack)
+ DataObject.Reset ();
+
GridView grid = new GridView ();
ObjectDataSource ds = new ObjectDataSource ();
@@ -2274,7 +2247,6 @@
if (pageHTML.IndexOf ("EditSuccess") < 0) {
Assert.Fail ("EditFail");
}
- Unload();
}
[Test]
@@ -2366,11 +2338,6 @@
object o = g.SelectedValue;
}
- public void Unload()
- {
- WebTest.Unload();
- }
-
[TestFixtureTearDown]
public void TearDown()
{
@@ -2443,7 +2410,12 @@
public static DataTable Select ()
{
return ds;
- }
+ }
+
+ public static void Reset ()
+ {
+ ds = CreateDataTable ();
+ }
public static DataTable Delete (string ID, string FName, string
LName)
{
@@ -2520,7 +2492,7 @@
aTable.PrimaryKey = new DataColumn[] {
aTable.Columns["ID"] };
return aTable;
- }
+ }
}
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches