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 19:59:20 UTC

svn commit: r191698 - in /struts/sandbox/trunk/overdrive/PhoneBook: Core/ Test/Commands/ Test/Resources/Command/ Test/Resources/Query/ Web/Resources/Query/

Author: husted
Date: Tue Jun 21 10:59:19 2005
New Revision: 191698

URL: http://svn.apache.org/viewcvs?rev=191698&view=rev
Log:
OVR-5
* Extend test and add code to setup other filter lists.

Modified:
    struts/sandbox/trunk/overdrive/PhoneBook/Core/App.cs
    struts/sandbox/trunk/overdrive/PhoneBook/Test/Commands/DirectoryViewTest.cs
    struts/sandbox/trunk/overdrive/PhoneBook/Test/Resources/Command/AppBase.xml
    struts/sandbox/trunk/overdrive/PhoneBook/Test/Resources/Command/Catalog.xml
    struts/sandbox/trunk/overdrive/PhoneBook/Test/Resources/Query/FilterLists.xml
    struts/sandbox/trunk/overdrive/PhoneBook/Web/Resources/Query/FilterLists.xml

Modified: struts/sandbox/trunk/overdrive/PhoneBook/Core/App.cs
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/PhoneBook/Core/App.cs?rev=191698&r1=191697&r2=191698&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/PhoneBook/Core/App.cs (original)
+++ struts/sandbox/trunk/overdrive/PhoneBook/Core/App.cs Tue Jun 21 10:59:19 2005
@@ -82,6 +82,36 @@
 		public const string LAST_NAME_LIST = "last_name_list";
 
 		/// <summary>
+		/// Token for List Last Names command.
+		/// </summary>
+		/// 
+		public const string FIRST_NAME_LIST = "first_name_list";
+
+		/// <summary>
+		/// Token for List Extensions command.
+		/// </summary>
+		/// 
+		public const string EXTENSION_LIST = "extension_list";
+
+		/// <summary>
+		/// Token for List UserNames command.
+		/// </summary>
+		/// 
+		public const string USER_NAME_LIST = "user_name_list";
+
+		/// <summary>
+		/// Token for List Hire Dates command.
+		/// </summary>
+		/// 
+		public const string HIRED_LIST = "hired_list";
+
+		/// <summary>
+		/// Token for List Hours command.
+		/// </summary>
+		/// 
+		public const string HOURS_LIST = "hours_list";
+
+		/// <summary>
 		/// Token for Directory View command.
 		/// </summary>
 		/// 

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=191698&r1=191697&r2=191698&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/PhoneBook/Test/Commands/DirectoryViewTest.cs (original)
+++ struts/sandbox/trunk/overdrive/PhoneBook/Test/Commands/DirectoryViewTest.cs Tue Jun 21 10:59:19 2005
@@ -12,20 +12,23 @@
 	public class DirectoryViewTest : BaseTest
 	{
 		/// <summary>
-		/// Confirm that context contains the expected attributes for the list filters.
+		/// Confirm that Context contains the expected attributes for the list filters.
 		/// </summary>
 		/// 
 		[Test]
 		public void ContainsFilters ()
 		{
 			IRequestContext context = catalog.ExecuteRequest (App.DIRECTORY_VIEW);
-			string[] keys = {App.LAST_NAME_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.");
 			}
 		}
 
+		/// <summary>
+		/// Confirm that Helper contains the expected command.
+		/// </summary>
 		[Test]
 		public void HelperContains ()
 		{

Modified: struts/sandbox/trunk/overdrive/PhoneBook/Test/Resources/Command/AppBase.xml
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/PhoneBook/Test/Resources/Command/AppBase.xml?rev=191698&r1=191697&r2=191698&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/PhoneBook/Test/Resources/Command/AppBase.xml (original)
+++ struts/sandbox/trunk/overdrive/PhoneBook/Test/Resources/Command/AppBase.xml Tue Jun 21 10:59:19 2005
@@ -3,6 +3,8 @@
 	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
 	xsi:schemaLocation="http://www.springframework.net http://www.springframework.net/xsd/spring-objects.xsd">
 
-	<object id="BaseChain" type="Nexus.Core.RequestChain, Nexus.Core"></object>
+	<object id="BaseChain" type="Nexus.Core.RequestChain, Nexus.Core"/>
+	
+	<object id="BaseFilterList" type="PhoneBook.Core.Commands.BaseFilterList, PhoneBook.Core"/>
 
 </objects>

Modified: struts/sandbox/trunk/overdrive/PhoneBook/Test/Resources/Command/Catalog.xml
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/PhoneBook/Test/Resources/Command/Catalog.xml?rev=191698&r1=191697&r2=191698&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/PhoneBook/Test/Resources/Command/Catalog.xml (original)
+++ struts/sandbox/trunk/overdrive/PhoneBook/Test/Resources/Command/Catalog.xml Tue Jun 21 10:59:19 2005
@@ -7,10 +7,30 @@
 	<property name="ID"><value>select_all</value></property>
   </object>
 
-  <object id="last_name_list" type="PhoneBook.Core.Commands.BaseFilterList, PhoneBook.Core">
+  <object id="last_name_list" parent="BaseFilterList">
 	<property name="ID"><value>last_name_list</value></property>
   </object>
+
+  <object id="first_name_list" parent="BaseFilterList">
+	<property name="ID"><value>first_name_list</value></property>
+  </object>
   
+  <object id="extension_list" parent="BaseFilterList">
+	<property name="ID"><value>extension_list</value></property>
+  </object>
+
+  <object id="user_name_list" parent="BaseFilterList">
+	<property name="ID"><value>user_name_list</value></property>
+  </object>
+
+  <object id="hired_list" parent="BaseFilterList">
+	<property name="ID"><value>hired_list</value></property>
+  </object>
+
+  <object id="hours_list" parent="BaseFilterList">
+	<property name="ID"><value>hours_list</value></property>
+  </object>
+
     <object id="directory_view" parent="BaseChain">
 		<property name="ID">
 			<value>directory_view</value>
@@ -18,11 +38,21 @@
 		<property name="RelatedIDs">
 			<list>
 				<value>last_name_list</value>
+				<value>first_name_list</value>
+				<value>extension_list</value>
+				<value>user_name_list</value>
+				<value>hired_list</value>
+				<value>hours_list</value>
 			</list>
 		</property>
 		<property name="AddCommands">
 			<list>
 				<ref object="last_name_list" />
+				<ref object="first_name_list" />
+				<ref object="extension_list" />
+				<ref object="user_name_list" />
+				<ref object="hired_list" />
+				<ref object="hours_list" />
 			</list>
 		</property>
 	</object>

Modified: struts/sandbox/trunk/overdrive/PhoneBook/Test/Resources/Query/FilterLists.xml
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/PhoneBook/Test/Resources/Query/FilterLists.xml?rev=191698&r1=191697&r2=191698&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/PhoneBook/Test/Resources/Query/FilterLists.xml (original)
+++ struts/sandbox/trunk/overdrive/PhoneBook/Test/Resources/Query/FilterLists.xml Tue Jun 21 10:59:19 2005
@@ -6,12 +6,49 @@
 	xsi:noNamespaceSchemaLocation="SqlMap.xsd" >
 	
 	<statements>
-		<select id="list_last_names" resultClass="string">
+
+		<select id="last_name_list" resultClass="string">
 			SELECT DISTINCT 
 				last_name
 			FROM entry
 			ORDER BY last_name			
 		</select>
+		
+		<select id="first_name_list" resultClass="string">
+			SELECT DISTINCT 
+				first_name
+			FROM entry
+			ORDER BY first_name
+		</select>
+		
+		<select id="extension_list" resultClass="string">
+			SELECT DISTINCT 
+				extension
+			FROM entry
+			ORDER BY extension
+		</select>
+
+		<select id="user_name_list" resultClass="string">
+			SELECT DISTINCT 
+				user_name
+			FROM entry
+			ORDER BY user_name
+		</select>
+
+		<select id="hired_list" resultClass="string">
+			SELECT DISTINCT 
+				hired
+			FROM entry
+			ORDER BY hired
+		</select>
+
+		<select id="hours_list" resultClass="string">
+			SELECT DISTINCT 
+				hours
+			FROM entry
+			ORDER BY hours
+		</select>
+
 	</statements>
 
 </sqlMap>

Modified: struts/sandbox/trunk/overdrive/PhoneBook/Web/Resources/Query/FilterLists.xml
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/PhoneBook/Web/Resources/Query/FilterLists.xml?rev=191698&r1=191697&r2=191698&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/PhoneBook/Web/Resources/Query/FilterLists.xml (original)
+++ struts/sandbox/trunk/overdrive/PhoneBook/Web/Resources/Query/FilterLists.xml Tue Jun 21 10:59:19 2005
@@ -6,12 +6,49 @@
 	xsi:noNamespaceSchemaLocation="SqlMap.xsd" >
 	
 	<statements>
+
 		<select id="last_name_list" resultClass="string">
 			SELECT DISTINCT 
 				last_name
 			FROM entry
 			ORDER BY last_name			
 		</select>
+		
+		<select id="first_name_list" resultClass="string">
+			SELECT DISTINCT 
+				first_name
+			FROM entry
+			ORDER BY first_name
+		</select>
+		
+		<select id="extension_list" resultClass="string">
+			SELECT DISTINCT 
+				extension
+			FROM entry
+			ORDER BY extension
+		</select>
+
+		<select id="user_name_list" resultClass="string">
+			SELECT DISTINCT 
+				user_name
+			FROM entry
+			ORDER BY user_name
+		</select>
+
+		<select id="hired_list" resultClass="string">
+			SELECT DISTINCT 
+				hired
+			FROM entry
+			ORDER BY hired
+		</select>
+
+		<select id="hours_list" resultClass="string">
+			SELECT DISTINCT 
+				hours
+			FROM entry
+			ORDER BY hours
+		</select>
+
 	</statements>
 
 </sqlMap>



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