Author: husted Date: Sat Sep 10 12:16:22 2005 New Revision: 280029 URL: http://svn.apache.org/viewcvs?rev=280029&view=rev Log: OVR-15 * Reformat code only. No changes.
Modified: struts/sandbox/trunk/overdrive/Agility/Core/AssemblyInfo.cs struts/sandbox/trunk/overdrive/Agility/Core/Chain.cs struts/sandbox/trunk/overdrive/Agility/Core/Context.cs struts/sandbox/trunk/overdrive/Agility/Core/ICatalog.cs struts/sandbox/trunk/overdrive/Agility/Core/IChain.cs struts/sandbox/trunk/overdrive/Agility/Core/ICommand.cs struts/sandbox/trunk/overdrive/Agility/Core/IFilter.cs struts/sandbox/trunk/overdrive/Agility/Test/AssemblyInfo.cs struts/sandbox/trunk/overdrive/Agility/Test/CommandTest.cs struts/sandbox/trunk/overdrive/Agility/Test/TestChain.cs struts/sandbox/trunk/overdrive/Agility/Test/TestCommand.cs struts/sandbox/trunk/overdrive/Agility/Test/TestContext.cs struts/sandbox/trunk/overdrive/Agility/Test/TestFilterCommand.cs struts/sandbox/trunk/overdrive/Agility/Test/TestFilterHandler.cs struts/sandbox/trunk/overdrive/Agility/Test/TestInputCommand.cs struts/sandbox/trunk/overdrive/Agility/Test/TestModifyCommand.cs struts/sandbox/trunk/overdrive/Agility/Test/TestNotImplementedCommand.cs struts/sandbox/trunk/overdrive/Agility/Test/TestNowCommand.cs struts/sandbox/trunk/overdrive/Agility/Test/TestRemoveCommand.cs Modified: struts/sandbox/trunk/overdrive/Agility/Core/AssemblyInfo.cs URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/Agility/Core/AssemblyInfo.cs?rev=280029&r1=280028&r2=280029&view=diff ============================================================================== --- struts/sandbox/trunk/overdrive/Agility/Core/AssemblyInfo.cs (original) +++ struts/sandbox/trunk/overdrive/Agility/Core/AssemblyInfo.cs Sat Sep 10 12:16:22 2005 @@ -1,19 +1,17 @@ using System.Reflection; -using System.Runtime.CompilerServices; - // // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. // -[assembly: AssemblyTitle("")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("")] -[assembly: AssemblyCopyright("")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] +[assembly : AssemblyTitle("")] +[assembly : AssemblyDescription("")] +[assembly : AssemblyConfiguration("")] +[assembly : AssemblyCompany("")] +[assembly : AssemblyProduct("")] +[assembly : AssemblyCopyright("")] +[assembly : AssemblyTrademark("")] +[assembly : AssemblyCulture("")] // // Version information for an assembly consists of the following four values: @@ -26,7 +24,7 @@ // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.*")] +[assembly : AssemblyVersion("1.0.*")] // // In order to sign your assembly you must specify a key to use. Refer to the @@ -53,6 +51,6 @@ // (*) Delay Signing is an advanced option - see the Microsoft .NET Framework // documentation for more information on this. // -[assembly: AssemblyDelaySign(false)] -[assembly: AssemblyKeyFile("")] -[assembly: AssemblyKeyName("")] +[assembly : AssemblyDelaySign(false)] +[assembly : AssemblyKeyFile("")] +[assembly : AssemblyKeyName("")] \ No newline at end of file Modified: struts/sandbox/trunk/overdrive/Agility/Core/Chain.cs URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/Agility/Core/Chain.cs?rev=280029&r1=280028&r2=280029&view=diff ============================================================================== --- struts/sandbox/trunk/overdrive/Agility/Core/Chain.cs (original) +++ struts/sandbox/trunk/overdrive/Agility/Core/Chain.cs Sat Sep 10 12:16:22 2005 @@ -30,7 +30,7 @@ /// <summary> /// Construct a [EMAIL PROTECTED] IChain} with no configured [EMAIL PROTECTED] ICommand}s. /// </summary> - public Chain () + public Chain() { } @@ -38,20 +38,20 @@ /// Construct a [EMAIL PROTECTED] IChain} configured with the specified [EMAIL PROTECTED] ICommand}. /// </summary> /// <param name="command">The [EMAIL PROTECTED] ICommand} to be configured.</param> - public Chain (ICommand command) + public Chain(ICommand command) { - AddCommand (command); + AddCommand(command); } /// <summary> /// Construct a [EMAIL PROTECTED] IChain} configured with the specified [EMAIL PROTECTED] ICommand}s. /// </summary> /// <param name="commands">The [EMAIL PROTECTED] ICommand}s to be configured.</param> - public Chain (ICommand[] commands) + public Chain(ICommand[] commands) { if (commands == null) // FIXME: Illegal Argument - throw new Exception (); - for (int i = 0; i < commands.Length; i++) AddCommand (commands [i]); + throw new Exception(); + for (int i = 0; i < commands.Length; i++) AddCommand(commands[i]); } @@ -60,7 +60,7 @@ /// Construct a [EMAIL PROTECTED] IChain} configured with the specified [EMAIL PROTECTED] ICommand}s. /// </summary> /// <param name="commands">The [EMAIL PROTECTED] ICommand}s to be configured</param> - public Chain (IList commands) : base () + public Chain(IList commands) : base() { AddCommands = commands; } @@ -84,15 +84,15 @@ #region Chain Methods // See interface - public void AddCommand (ICommand command) + public void AddCommand(ICommand command) { if (command == null) - throw new ArgumentNullException ("command==null", "Chain.AddCommand"); + throw new ArgumentNullException("command==null", "Chain.AddCommand"); if (frozen) - throw new ApplicationException ("Chain.AddCommand: frozen==true"); + throw new ApplicationException("Chain.AddCommand: frozen==true"); ICommand[] results = new ICommand[commands.Length + 1]; - Array.Copy (commands, 0, results, 0, commands.Length); - results [commands.Length] = command; + Array.Copy(commands, 0, results, 0, commands.Length); + results[commands.Length] = command; commands = results; } @@ -102,19 +102,19 @@ set { if (value == null) - throw new ArgumentNullException ("value==null", "Chain.AddCommands"); - IEnumerator elements = value.GetEnumerator (); - while (elements.MoveNext ()) AddCommand (elements.Current as ICommand); + throw new ArgumentNullException("value==null", "Chain.AddCommands"); + IEnumerator elements = value.GetEnumerator(); + while (elements.MoveNext()) AddCommand(elements.Current as ICommand); } } // See interface - public bool Execute (IContext context) + public bool Execute(IContext context) { // Verify our parameters if (context == null) - throw new ArgumentNullException ("context==null", "Chain.Execute"); + throw new ArgumentNullException("context==null", "Chain.Execute"); // Freeze the configuration of the command list frozen = true; @@ -130,7 +130,7 @@ { try { - saveResult = commands [i].Execute (context); + saveResult = commands[i].Execute(context); if (saveResult) break; } catch (Exception e) @@ -149,12 +149,12 @@ bool result = false; for (int j = i; j >= 0; j--) { - if (commands [j] is IFilter) + if (commands[j] is IFilter) { try { result = - ((IFilter) commands [j]).PostProcess (context, saveException); + ((IFilter) commands[j]).PostProcess(context, saveException); if (result) handled = true; } @@ -177,7 +177,7 @@ /// Return an array of the configured [EMAIL PROTECTED] ICommand}s for this [EMAIL PROTECTED] IChain}. This method is internal to the assembly and is used only for the unit tests. /// </summary> /// <returns>An array of the configured [EMAIL PROTECTED] ICommand}s for this [EMAIL PROTECTED] IChain}</returns> - public ICommand[] GetCommands () + public ICommand[] GetCommands() { return (commands); Modified: struts/sandbox/trunk/overdrive/Agility/Core/Context.cs URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/Agility/Core/Context.cs?rev=280029&r1=280028&r2=280029&view=diff ============================================================================== --- struts/sandbox/trunk/overdrive/Agility/Core/Context.cs (original) +++ struts/sandbox/trunk/overdrive/Agility/Core/Context.cs Sat Sep 10 12:16:22 2005 @@ -25,7 +25,7 @@ /// <summary> /// Default constructor. /// </summary> - public Context () + public Context() { } @@ -35,9 +35,9 @@ /// </summary> /// <param name="key">Index for entry</param> /// <param name="_value">Value for entry</param> - public Context (string key, object _value) + public Context(string key, object _value) { - this.Add (key, _value); + this.Add(key, _value); } } } Modified: struts/sandbox/trunk/overdrive/Agility/Core/ICatalog.cs URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/Agility/Core/ICatalog.cs?rev=280029&r1=280028&r2=280029&view=diff ============================================================================== --- struts/sandbox/trunk/overdrive/Agility/Core/ICatalog.cs (original) +++ struts/sandbox/trunk/overdrive/Agility/Core/ICatalog.cs Sat Sep 10 12:16:22 2005 @@ -36,7 +36,7 @@ /// </summary> /// <param name="name">Name of the new command</param> /// <param name="command">[EMAIL PROTECTED] ICommand} or [EMAIL PROTECTED] IChain} to be returned</param> - void AddCommand (String name, ICommand command); + void AddCommand(String name, ICommand command); /// <summary> /// Return the [EMAIL PROTECTED] ICommand} or [EMAIL PROTECTED] IChain} associated with the @@ -44,7 +44,7 @@ /// </summary> /// <param name="name">Name for which a [EMAIL PROTECTED] ICommand} or [EMAIL PROTECTED] IChain} /// should be retrieved</param> - ICommand GetCommand (String name); + ICommand GetCommand(String name); /// <summary> /// Return an <code>IEnumerator</code> over the set of named commands @@ -53,7 +53,7 @@ /// <remarks> /// <p>If there are no known commands, an empty IEnumerator is returned.</p> /// </remarks> - IEnumerator GetNames (); + IEnumerator GetNames(); } } Modified: struts/sandbox/trunk/overdrive/Agility/Core/IChain.cs URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/Agility/Core/IChain.cs?rev=280029&r1=280028&r2=280029&view=diff ============================================================================== --- struts/sandbox/trunk/overdrive/Agility/Core/IChain.cs (original) +++ struts/sandbox/trunk/overdrive/Agility/Core/IChain.cs Sat Sep 10 12:16:22 2005 @@ -62,7 +62,7 @@ /// at least once, it is no longer possible to add additional /// [EMAIL PROTECTED] ICommand}s; instead, an Exception will be thrown.</p> /// </remarks> - void AddCommand (ICommand command); + void AddCommand(ICommand command); /// <summary> /// Add a IList of [EMAIL PROTECTED] ICommand}s to the list of [EMAIL PROTECTED] ICommand}s. @@ -109,7 +109,7 @@ /// is complete, or <code>false</code> if further processing /// of this [EMAIL PROTECTED] IContext} can be delegated to a subsequent /// [EMAIL PROTECTED] ICommand} in an enclosing [EMAIL PROTECTED] IChain}</returns> - new bool Execute (IContext context); + new bool Execute(IContext context); } } Modified: struts/sandbox/trunk/overdrive/Agility/Core/ICommand.cs URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/Agility/Core/ICommand.cs?rev=280029&r1=280028&r2=280029&view=diff ============================================================================== --- struts/sandbox/trunk/overdrive/Agility/Core/ICommand.cs (original) +++ struts/sandbox/trunk/overdrive/Agility/Core/ICommand.cs Sat Sep 10 12:16:22 2005 @@ -91,7 +91,7 @@ /// of this [EMAIL PROTECTED] IContext} should be delegated to a subsequent /// [EMAIL PROTECTED] ICommand} in an enclosing [EMAIL PROTECTED] IChain} /// </returns> - bool Execute (IContext context); + bool Execute(IContext context); } } Modified: struts/sandbox/trunk/overdrive/Agility/Core/IFilter.cs URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/Agility/Core/IFilter.cs?rev=280029&r1=280028&r2=280029&view=diff ============================================================================== --- struts/sandbox/trunk/overdrive/Agility/Core/IFilter.cs (original) +++ struts/sandbox/trunk/overdrive/Agility/Core/IFilter.cs Sat Sep 10 12:16:22 2005 @@ -36,6 +36,6 @@ /// <param name="context">The [EMAIL PROTECTED] Context} to be processed by this [EMAIL PROTECTED] Filter}</param> /// <param name="exception">The <code>Exception</code> (if any) that was thrown by the last [EMAIL PROTECTED] Command} that was executed; otherwise <code>null</code></param> /// <returns>If a non-null <code>exception</code> was "handled" by this method (and therefore need not be rethrown), return <code>true</code>; otherwise return <code>false</code></returns> - bool PostProcess (IContext context, Exception exception); + bool PostProcess(IContext context, Exception exception); } } Modified: struts/sandbox/trunk/overdrive/Agility/Test/AssemblyInfo.cs URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/Agility/Test/AssemblyInfo.cs?rev=280029&r1=280028&r2=280029&view=diff ============================================================================== --- struts/sandbox/trunk/overdrive/Agility/Test/AssemblyInfo.cs (original) +++ struts/sandbox/trunk/overdrive/Agility/Test/AssemblyInfo.cs Sat Sep 10 12:16:22 2005 @@ -1,19 +1,17 @@ using System.Reflection; -using System.Runtime.CompilerServices; - // // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. // -[assembly: AssemblyTitle("")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("")] -[assembly: AssemblyCopyright("")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] +[assembly : AssemblyTitle("")] +[assembly : AssemblyDescription("")] +[assembly : AssemblyConfiguration("")] +[assembly : AssemblyCompany("")] +[assembly : AssemblyProduct("")] +[assembly : AssemblyCopyright("")] +[assembly : AssemblyTrademark("")] +[assembly : AssemblyCulture("")] // // Version information for an assembly consists of the following four values: @@ -26,7 +24,7 @@ // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.*")] +[assembly : AssemblyVersion("1.0.*")] // // In order to sign your assembly you must specify a key to use. Refer to the @@ -53,6 +51,6 @@ // (*) Delay Signing is an advanced option - see the Microsoft .NET Framework // documentation for more information on this. // -[assembly: AssemblyDelaySign(false)] -[assembly: AssemblyKeyFile("")] -[assembly: AssemblyKeyName("")] +[assembly : AssemblyDelaySign(false)] +[assembly : AssemblyKeyFile("")] +[assembly : AssemblyKeyName("")] \ No newline at end of file Modified: struts/sandbox/trunk/overdrive/Agility/Test/CommandTest.cs URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/Agility/Test/CommandTest.cs?rev=280029&r1=280028&r2=280029&view=diff ============================================================================== --- struts/sandbox/trunk/overdrive/Agility/Test/CommandTest.cs (original) +++ struts/sandbox/trunk/overdrive/Agility/Test/CommandTest.cs Sat Sep 10 12:16:22 2005 @@ -10,60 +10,60 @@ public class CommandTest { [Test] - public void ModifyCommand () + public void ModifyCommand() { const string VALUE = TestInputCommand.VALUE; - TestContext context = new TestContext (); - context.Add (context.InputKey, VALUE); - ICommand command = new TestModifyCommand (); - command.Execute (context); - string output = context [context.OutputKey] as string; - Assert.IsNotNull (output, "Expected output"); - Assert.IsFalse (VALUE.Equals (output), "Expected modified output"); - string input = context [context.InputKey] as string; - Assert.IsTrue (VALUE.Equals (input), "Expected " + VALUE + " but found " + input); + TestContext context = new TestContext(); + context.Add(context.InputKey, VALUE); + ICommand command = new TestModifyCommand(); + command.Execute(context); + string output = context[context.OutputKey] as string; + Assert.IsNotNull(output, "Expected output"); + Assert.IsFalse(VALUE.Equals(output), "Expected modified output"); + string input = context[context.InputKey] as string; + Assert.IsTrue(VALUE.Equals(input), "Expected " + VALUE + " but found " + input); } [Test] - public void NotImplementedCommand () + public void NotImplementedCommand() { - TestContext context = new TestContext (); - ICommand command = new TestNotImplementedCommand (); + TestContext context = new TestContext(); + ICommand command = new TestNotImplementedCommand(); try { - command.Execute (context); - Assert.Fail ("Expected exception"); + command.Execute(context); + Assert.Fail("Expected exception"); } catch (NotImplementedException expected) { - Assert.IsNotNull (expected, "Expected exception"); + Assert.IsNotNull(expected, "Expected exception"); } } [Test] - public void NowCommand () + public void NowCommand() { - TestContext context = new TestContext (); - ICommand command = new TestNowCommand (); - command.Execute (context); - DateTime then = (DateTime) context [context.OutputKey]; - int greater = DateTime.Now.CompareTo (then); - Assert.IsTrue (greater >= 0, "Expected now to be past"); + TestContext context = new TestContext(); + ICommand command = new TestNowCommand(); + command.Execute(context); + DateTime then = (DateTime) context[context.OutputKey]; + int greater = DateTime.Now.CompareTo(then); + Assert.IsTrue(greater >= 0, "Expected now to be past"); } [Test] - public void RemoveCommand () + public void RemoveCommand() { - ICommand command = new TestRemoveCommand (); + ICommand command = new TestRemoveCommand(); const string VALUE = TestInputCommand.VALUE; - TestContext context = new TestContext (); - context.Add (context.InputKey, VALUE); - command.Execute (context); - string input = context [context.InputKey] as string; - Assert.IsNull (input, "Expected input to be removed"); - string output = context [context.OutputKey] as string; - Assert.IsNotNull (output, "Expected non-null output"); - Assert.IsTrue (VALUE.Equals (output), "Expected " + VALUE + " but found " + output); + TestContext context = new TestContext(); + context.Add(context.InputKey, VALUE); + command.Execute(context); + string input = context[context.InputKey] as string; + Assert.IsNull(input, "Expected input to be removed"); + string output = context[context.OutputKey] as string; + Assert.IsNotNull(output, "Expected non-null output"); + Assert.IsTrue(VALUE.Equals(output), "Expected " + VALUE + " but found " + output); } } } Modified: struts/sandbox/trunk/overdrive/Agility/Test/TestChain.cs URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/Agility/Test/TestChain.cs?rev=280029&r1=280028&r2=280029&view=diff ============================================================================== --- struts/sandbox/trunk/overdrive/Agility/Test/TestChain.cs (original) +++ struts/sandbox/trunk/overdrive/Agility/Test/TestChain.cs Sat Sep 10 12:16:22 2005 @@ -12,9 +12,9 @@ private IChain chain; [SetUp] - public void SetUp () + public void SetUp() { - chain = new Chain (); + chain = new Chain(); } @@ -24,97 +24,97 @@ /// Test adding commands and that chain "freezes" after execute. /// </summary> [Test] - public void TestAddCommand () + public void TestAddCommand() { Chain test = chain as Chain; - ICommand[] before = test.GetCommands (); - Assert.AreEqual (0, before.Length, "Expected an empty chain"); + ICommand[] before = test.GetCommands(); + Assert.AreEqual(0, before.Length, "Expected an empty chain"); - ICommand c1 = new TestCommand (); - chain.AddCommand (c1); + ICommand c1 = new TestCommand(); + chain.AddCommand(c1); - ICommand[] first = test.GetCommands (); - Assert.AreEqual (1, first.Length, "Expected one link in the chain"); + ICommand[] first = test.GetCommands(); + Assert.AreEqual(1, first.Length, "Expected one link in the chain"); - ICommand c2 = new TestNowCommand (); - chain.AddCommand (c2); + ICommand c2 = new TestNowCommand(); + chain.AddCommand(c2); - ICommand[] second = test.GetCommands (); - Assert.AreEqual (2, second.Length, "Expected two links in the chain"); + ICommand[] second = test.GetCommands(); + Assert.AreEqual(2, second.Length, "Expected two links in the chain"); - TestContext context = new TestContext (); - chain.Execute (context); + TestContext context = new TestContext(); + chain.Execute(context); - DateTime output = (DateTime) context [context.OutputKey]; - Assert.IsNotNull (output, "Expected output"); + DateTime output = (DateTime) context[context.OutputKey]; + Assert.IsNotNull(output, "Expected output"); try { - chain.AddCommand (c1); - Assert.Fail ("Expected exception when adding command to frozen chain."); + chain.AddCommand(c1); + Assert.Fail("Expected exception when adding command to frozen chain."); } catch (Exception expected) { // FIXME: Exception has to be specific - Assert.IsNotNull (expected, "Expected exception"); + Assert.IsNotNull(expected, "Expected exception"); } } [Test] - public void TestExecute () + public void TestExecute() { - chain.AddCommand (new TestInputCommand ()); - chain.AddCommand (new TestModifyCommand ()); - TestContext context = new TestContext (); - chain.Execute (context); - string output = context [context.OutputKey] as string; - Assert.IsNotNull (output, "Expected output"); + chain.AddCommand(new TestInputCommand()); + chain.AddCommand(new TestModifyCommand()); + TestContext context = new TestContext(); + chain.Execute(context); + string output = context[context.OutputKey] as string; + Assert.IsNotNull(output, "Expected output"); string expected = TestInputCommand.VALUE + TestModifyCommand.SUFFIX; - Assert.IsTrue (expected.Equals (output), "Expected modified output"); + Assert.IsTrue(expected.Equals(output), "Expected modified output"); } [Test] - public void TextExecuteReverse () + public void TextExecuteReverse() { - chain.AddCommand (new TestModifyCommand ()); - chain.AddCommand (new TestInputCommand ()); - TestContext context = new TestContext (); - chain.Execute (context); - string output = context [context.OutputKey] as string; + chain.AddCommand(new TestModifyCommand()); + chain.AddCommand(new TestInputCommand()); + TestContext context = new TestContext(); + chain.Execute(context); + string output = context[context.OutputKey] as string; string expected = TestModifyCommand.SUFFIX; - Assert.IsTrue (expected.Equals (output), "Expected modified suffix only"); + Assert.IsTrue(expected.Equals(output), "Expected modified suffix only"); } [Test] - public void TestFilterCommand () + public void TestFilterCommand() { string KEY = "FILTER"; // TestFilterCommand.FILTER_KEY; - chain.AddCommand (new TestFilterCommand ()); - chain.AddCommand (new TestNotImplementedCommand ()); - IContext context = new TestContext (); + chain.AddCommand(new TestFilterCommand()); + chain.AddCommand(new TestNotImplementedCommand()); + IContext context = new TestContext(); try { - chain.Execute (context); - Assert.Fail ("Expected NotImplementedException"); + chain.Execute(context); + Assert.Fail("Expected NotImplementedException"); } catch (NotImplementedException expected) { - Assert.IsNotNull (expected, "Expected exception"); + Assert.IsNotNull(expected, "Expected exception"); } - ICommand filter = context [KEY] as ICommand; - Assert.IsNull (filter); + ICommand filter = context[KEY] as ICommand; + Assert.IsNull(filter); } [Test] - public void TestFilterHandler () + public void TestFilterHandler() { string KEY = "FILTER"; // TestFilterCommand.FILTER_KEY; - chain.AddCommand (new TestFilterHandler ()); - chain.AddCommand (new TestNotImplementedCommand ()); - IContext context = new TestContext (); - chain.Execute (context); - NotImplementedException filter = context [KEY] as NotImplementedException; - Assert.IsNotNull (filter, "Expected Exception to be stored."); + chain.AddCommand(new TestFilterHandler()); + chain.AddCommand(new TestNotImplementedCommand()); + IContext context = new TestContext(); + chain.Execute(context); + NotImplementedException filter = context[KEY] as NotImplementedException; + Assert.IsNotNull(filter, "Expected Exception to be stored."); } } Modified: struts/sandbox/trunk/overdrive/Agility/Test/TestCommand.cs URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/Agility/Test/TestCommand.cs?rev=280029&r1=280028&r2=280029&view=diff ============================================================================== --- struts/sandbox/trunk/overdrive/Agility/Test/TestCommand.cs (original) +++ struts/sandbox/trunk/overdrive/Agility/Test/TestCommand.cs Sat Sep 10 12:16:22 2005 @@ -5,7 +5,7 @@ /// </summary> public class TestCommand : ICommand { - public bool Execute (IContext context) + public bool Execute(IContext context) { ; // do nothing return false; Modified: struts/sandbox/trunk/overdrive/Agility/Test/TestContext.cs URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/Agility/Test/TestContext.cs?rev=280029&r1=280028&r2=280029&view=diff ============================================================================== --- struts/sandbox/trunk/overdrive/Agility/Test/TestContext.cs (original) +++ struts/sandbox/trunk/overdrive/Agility/Test/TestContext.cs Sat Sep 10 12:16:22 2005 @@ -6,6 +6,7 @@ public class TestContext : Context { private string _InputKey = "input"; + public string InputKey { get { return _InputKey; } @@ -14,6 +15,7 @@ } private string _OutputKey = "output"; + public string OutputKey { get { return _OutputKey; } Modified: struts/sandbox/trunk/overdrive/Agility/Test/TestFilterCommand.cs URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/Agility/Test/TestFilterCommand.cs?rev=280029&r1=280028&r2=280029&view=diff ============================================================================== --- struts/sandbox/trunk/overdrive/Agility/Test/TestFilterCommand.cs (original) +++ struts/sandbox/trunk/overdrive/Agility/Test/TestFilterCommand.cs Sat Sep 10 12:16:22 2005 @@ -11,9 +11,9 @@ #region IFilter Members - public virtual bool PostProcess (IContext context, Exception exception) + public virtual bool PostProcess(IContext context, Exception exception) { - context [FILTER_KEY] = null; + context[FILTER_KEY] = null; return false; // == I took care of my business, but someone // still needs to handle the exception } @@ -22,9 +22,9 @@ #region ICommand Members - public bool Execute (IContext context) + public bool Execute(IContext context) { - context.Add (FILTER_KEY, this); + context.Add(FILTER_KEY, this); return false; } Modified: struts/sandbox/trunk/overdrive/Agility/Test/TestFilterHandler.cs URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/Agility/Test/TestFilterHandler.cs?rev=280029&r1=280028&r2=280029&view=diff ============================================================================== --- struts/sandbox/trunk/overdrive/Agility/Test/TestFilterHandler.cs (original) +++ struts/sandbox/trunk/overdrive/Agility/Test/TestFilterHandler.cs Sat Sep 10 12:16:22 2005 @@ -7,9 +7,9 @@ /// </summary> public class TestFilterHandler : TestFilterCommand { - public override bool PostProcess (IContext context, Exception exception) + public override bool PostProcess(IContext context, Exception exception) { - context [FILTER_KEY] = exception; + context[FILTER_KEY] = exception; return true; // == OK, I handled it! } } Modified: struts/sandbox/trunk/overdrive/Agility/Test/TestInputCommand.cs URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/Agility/Test/TestInputCommand.cs?rev=280029&r1=280028&r2=280029&view=diff ============================================================================== --- struts/sandbox/trunk/overdrive/Agility/Test/TestInputCommand.cs (original) +++ struts/sandbox/trunk/overdrive/Agility/Test/TestInputCommand.cs Sat Sep 10 12:16:22 2005 @@ -7,10 +7,10 @@ { public const string VALUE = "INPUT"; - public bool Execute (IContext _context) + public bool Execute(IContext _context) { TestContext context = _context as TestContext; - context.Add (context.InputKey, VALUE); + context.Add(context.InputKey, VALUE); return false; } Modified: struts/sandbox/trunk/overdrive/Agility/Test/TestModifyCommand.cs URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/Agility/Test/TestModifyCommand.cs?rev=280029&r1=280028&r2=280029&view=diff ============================================================================== --- struts/sandbox/trunk/overdrive/Agility/Test/TestModifyCommand.cs (original) +++ struts/sandbox/trunk/overdrive/Agility/Test/TestModifyCommand.cs Sat Sep 10 12:16:22 2005 @@ -9,12 +9,12 @@ { public const string SUFFIX = "_MODIFIED"; - public bool Execute (IContext _context) + public bool Execute(IContext _context) { TestContext context = _context as TestContext; - string input = context [context.InputKey] as string; + string input = context[context.InputKey] as string; string output = input + SUFFIX; - context [context.OutputKey] = output; + context[context.OutputKey] = output; return false; } } Modified: struts/sandbox/trunk/overdrive/Agility/Test/TestNotImplementedCommand.cs URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/Agility/Test/TestNotImplementedCommand.cs?rev=280029&r1=280028&r2=280029&view=diff ============================================================================== --- struts/sandbox/trunk/overdrive/Agility/Test/TestNotImplementedCommand.cs (original) +++ struts/sandbox/trunk/overdrive/Agility/Test/TestNotImplementedCommand.cs Sat Sep 10 12:16:22 2005 @@ -7,9 +7,9 @@ /// </summary> public class TestNotImplementedCommand : ICommand { - public bool Execute (IContext context) + public bool Execute(IContext context) { - throw new NotImplementedException (); + throw new NotImplementedException(); } } } Modified: struts/sandbox/trunk/overdrive/Agility/Test/TestNowCommand.cs URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/Agility/Test/TestNowCommand.cs?rev=280029&r1=280028&r2=280029&view=diff ============================================================================== --- struts/sandbox/trunk/overdrive/Agility/Test/TestNowCommand.cs (original) +++ struts/sandbox/trunk/overdrive/Agility/Test/TestNowCommand.cs Sat Sep 10 12:16:22 2005 @@ -7,10 +7,10 @@ /// </summary> public class TestNowCommand : ICommand { - public bool Execute (IContext _context) + public bool Execute(IContext _context) { TestContext context = _context as TestContext; - context [context.OutputKey] = DateTime.Now; + context[context.OutputKey] = DateTime.Now; return false; } } Modified: struts/sandbox/trunk/overdrive/Agility/Test/TestRemoveCommand.cs URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/Agility/Test/TestRemoveCommand.cs?rev=280029&r1=280028&r2=280029&view=diff ============================================================================== --- struts/sandbox/trunk/overdrive/Agility/Test/TestRemoveCommand.cs (original) +++ struts/sandbox/trunk/overdrive/Agility/Test/TestRemoveCommand.cs Sat Sep 10 12:16:22 2005 @@ -6,12 +6,12 @@ /// </summary> public class TestRemoveCommand : ICommand { - public bool Execute (IContext _context) + public bool Execute(IContext _context) { TestContext context = _context as TestContext; - string value = context [context.InputKey] as string; - context [context.InputKey] = null; - context [context.OutputKey] = value; + string value = context[context.InputKey] as string; + context[context.InputKey] = null; + context[context.OutputKey] = value; return false; } } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]