You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by hu...@apache.org on 2005/06/21 20:15:11 UTC

svn commit: r191700 - in /struts/sandbox/trunk/overdrive/PhoneBook: Test/Commands/DirectoryViewTest.cs Test/Commands/FilterLists.cs Test/Forms/DirectoryTest.cs Web/Forms/Directory.aspx Web/Forms/Directory.aspx.cs

Author: husted
Date: Tue Jun 21 11:15:10 2005
New Revision: 191700

URL: http://svn.apache.org/viewcvs?rev=191700&view=rev
Log:
OVR-5
* Extend test to exercise other filter select lists. 
* Extend view chain with other commands; Add commands and statements for other lists.
* Rename controls to match command names, so that select lists autowire to query results.

Modified:
    struts/sandbox/trunk/overdrive/PhoneBook/Test/Commands/DirectoryViewTest.cs
    struts/sandbox/trunk/overdrive/PhoneBook/Test/Commands/FilterLists.cs
    struts/sandbox/trunk/overdrive/PhoneBook/Test/Forms/DirectoryTest.cs
    struts/sandbox/trunk/overdrive/PhoneBook/Web/Forms/Directory.aspx
    struts/sandbox/trunk/overdrive/PhoneBook/Web/Forms/Directory.aspx.cs

Modified: struts/sandbox/trunk/overdrive/PhoneBook/Test/Commands/DirectoryViewTest.cs
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/PhoneBook/Test/Commands/DirectoryViewTest.cs?rev=191700&r1=191699&r2=191700&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/PhoneBook/Test/Commands/DirectoryViewTest.cs (original)
+++ struts/sandbox/trunk/overdrive/PhoneBook/Test/Commands/DirectoryViewTest.cs Tue Jun 21 11:15:10 2005
@@ -19,7 +19,7 @@
 		public void ContainsFilters ()
 		{
 			IRequestContext context = catalog.ExecuteRequest (App.DIRECTORY_VIEW);
-			string[] keys = {App.LAST_NAME_LIST,App.FIRST_NAME_LIST,App.EXTENSION_LIST,App.USER_NAME_LIST,App.HIRED_LIST,App.HOURS_LIST};
+			string[] keys = {App.LAST_NAME_LIST, App.FIRST_NAME_LIST, App.EXTENSION_LIST, App.USER_NAME_LIST, App.HIRED_LIST, App.HOURS_LIST};
 			foreach (string key in keys)
 			{
 				Assert.IsTrue (context.Contains (key), key + ": Expected context to contain key.");

Modified: struts/sandbox/trunk/overdrive/PhoneBook/Test/Commands/FilterLists.cs
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/PhoneBook/Test/Commands/FilterLists.cs?rev=191700&r1=191699&r2=191700&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/PhoneBook/Test/Commands/FilterLists.cs (original)
+++ struts/sandbox/trunk/overdrive/PhoneBook/Test/Commands/FilterLists.cs Tue Jun 21 11:15:10 2005
@@ -40,13 +40,13 @@
 			{
 				Assert.IsNotNull (item, "Expected each item to be non-null");
 				string key = item.Value as string;
-				Assert.IsNotNull (key,"Expected each key to be non-null");
+				Assert.IsNotNull (key, "Expected each key to be non-null");
 				Assert.IsTrue (key.Length > 0, "Expected each key to be non-empty");
 			}
 			IDictionary keys = new Hashtable (list.Count);
 			foreach (IKeyValue item in list)
 			{
-				string key = item.Value as string;			
+				string key = item.Value as string;
 				if (keys.Contains (key)) Assert.Fail (key + ": Expected each item to be unique");
 				keys.Add (key, key);
 			}

Modified: struts/sandbox/trunk/overdrive/PhoneBook/Test/Forms/DirectoryTest.cs
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/PhoneBook/Test/Forms/DirectoryTest.cs?rev=191700&r1=191699&r2=191700&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/PhoneBook/Test/Forms/DirectoryTest.cs (original)
+++ struts/sandbox/trunk/overdrive/PhoneBook/Test/Forms/DirectoryTest.cs Tue Jun 21 11:15:10 2005
@@ -28,12 +28,12 @@
 	{
 		private PanelTester pnlFind;
 		private DropDownListTester last_name_list;
-		private DropDownListTester lstFirstName;
-		private DropDownListTester lstExtension;
-		private DropDownListTester lstUserName;
-		private DropDownListTester lstHireDate;
-		private DropDownListTester lstHours;
-		private DropDownListTester lstEditor;
+		private DropDownListTester first_name_list;
+		private DropDownListTester extension_list;
+		private DropDownListTester user_name_list;
+		private DropDownListTester hired_list;
+		private DropDownListTester hours_list;
+		// TODO: private DropDownListTester editor_list;
 		private ButtonTester cmdListAll;
 		private ButtonTester cmdPrint;
 
@@ -48,7 +48,7 @@
 		/// 
 		private DropDownListTester[] GetLists ()
 		{
-			DropDownListTester[] lists = {last_name_list, lstFirstName, lstExtension, lstUserName, lstHireDate, lstHours, lstEditor};
+			DropDownListTester[] lists = {last_name_list, first_name_list, extension_list, user_name_list, hired_list, hours_list};
 			return lists;
 		}
 
@@ -62,12 +62,12 @@
 
 			pnlFind = new PanelTester ("pnlFind", CurrentWebForm);
 			last_name_list = new DropDownListTester (App.LAST_NAME_LIST, CurrentWebForm);
-			lstFirstName = new DropDownListTester ("lstFirstName", CurrentWebForm);
-			lstExtension = new DropDownListTester ("lstExtension", CurrentWebForm);
-			lstUserName = new DropDownListTester ("lstUserName", CurrentWebForm);
-			lstHireDate = new DropDownListTester ("lstHireDate", CurrentWebForm);
-			lstHours = new DropDownListTester ("lstHours", CurrentWebForm);
-			lstEditor = new DropDownListTester ("lstEditor", CurrentWebForm);
+			first_name_list = new DropDownListTester (App.FIRST_NAME_LIST, CurrentWebForm);
+			extension_list = new DropDownListTester (App.EXTENSION_LIST, CurrentWebForm);
+			user_name_list = new DropDownListTester (App.USER_NAME_LIST, CurrentWebForm);
+			hired_list = new DropDownListTester (App.HIRED_LIST, CurrentWebForm);
+			hours_list = new DropDownListTester (App.HOURS_LIST, CurrentWebForm);
+			// TODO: editor_list = new DropDownListTester (App.EDITOR_LIST, CurrentWebForm);
 			cmdListAll = new ButtonTester ("cmdListAll", CurrentWebForm);
 			cmdPrint = new ButtonTester ("cmdPrint", CurrentWebForm);
 

Modified: struts/sandbox/trunk/overdrive/PhoneBook/Web/Forms/Directory.aspx
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/PhoneBook/Web/Forms/Directory.aspx?rev=191700&r1=191699&r2=191700&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/PhoneBook/Web/Forms/Directory.aspx (original)
+++ struts/sandbox/trunk/overdrive/PhoneBook/Web/Forms/Directory.aspx Tue Jun 21 11:15:10 2005
@@ -39,12 +39,11 @@
 			  <td>Editor</td>			  
 			  </tr><tr>
 			  <td><asp:DropDownList ID="last_name_list" Runat=server></asp:DropDownList></td>
-			  <td><asp:DropDownList ID="lstFirstName" Runat=server></asp:DropDownList></td>
-			  <td><asp:DropDownList ID="lstExtension" Runat=server></asp:DropDownList></td>
-			  <td><asp:DropDownList ID="lstUserName" Runat=server></asp:DropDownList></td>
-			  <td><asp:DropDownList ID="lstHireDate" Runat=server></asp:DropDownList></td>
-			  <td><asp:DropDownList ID="lstHours" Runat=server></asp:DropDownList></td>
-			  <td><asp:DropDownList ID="lstEditor" Runat=server></asp:DropDownList></td>
+			  <td><asp:DropDownList ID="first_name_list" Runat=server></asp:DropDownList></td>
+			  <td><asp:DropDownList ID="extension_list" Runat=server></asp:DropDownList></td>
+			  <td><asp:DropDownList ID="user_name_list" Runat=server></asp:DropDownList></td>
+			  <td><asp:DropDownList ID="hired_list" Runat=server></asp:DropDownList></td>
+			  <td><asp:DropDownList ID="hours_list" Runat=server></asp:DropDownList></td>
 			  </tr></table>
 			</asp:panel>
 			

Modified: struts/sandbox/trunk/overdrive/PhoneBook/Web/Forms/Directory.aspx.cs
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/PhoneBook/Web/Forms/Directory.aspx.cs?rev=191700&r1=191699&r2=191700&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/PhoneBook/Web/Forms/Directory.aspx.cs (original)
+++ struts/sandbox/trunk/overdrive/PhoneBook/Web/Forms/Directory.aspx.cs Tue Jun 21 11:15:10 2005
@@ -72,12 +72,12 @@
 
 		protected Panel pnlFind;
 		protected DropDownList last_name_list;
-		protected DropDownList lstFirstName;
-		protected DropDownList lstExtension;
-		protected DropDownList lstUserName;
-		protected DropDownList lstHireDate;
-		protected DropDownList lstHours;
-		protected DropDownList lstEditor;
+		protected DropDownList first_name_list;
+		protected DropDownList extension_list;
+		protected DropDownList user_name_list;
+		protected DropDownList hired_list;
+		protected DropDownList hours_list;
+		// TODO: protected DropDownList editor_list;
 		protected Button cmdListAll;
 		protected Button cmdPrint;
 
@@ -85,7 +85,7 @@
 
 		private DropDownList[] GetLists ()
 		{
-			DropDownList[] lists = {last_name_list, lstFirstName, lstExtension, lstUserName, lstHireDate, lstHours, lstEditor};
+			DropDownList[] lists = {last_name_list, first_name_list, extension_list, user_name_list, hired_list, hours_list};
 			return lists;
 		}
 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org