Fix unit test documentation and warnings
authorMichael Welch <michaelgwelch@gmail.com>
Mon, 20 Feb 2012 15:34:17 +0000 (09:34 -0600)
committerMichael Welch <michaelgwelch@gmail.com>
Mon, 20 Feb 2012 15:34:17 +0000 (09:34 -0600)
src.net/BrainmessCoreTests/LinkedListNodeTests.cs
src.net/BrainmessCoreTests/ProgramStreamTests.cs
src.net/BrainmessCoreTests/StringTests.cs

index 007c408..ff51c42 100644 (file)
@@ -67,10 +67,8 @@ namespace Welch.Brainmess
         {
             try
             {
-                LinkedListNode<int> node = null;
-// ReSharper disable ConditionIsAlwaysTrueOrFalse
+                LinkedListNode<int> node = GetNull();
                 node.MoveForward();
-// ReSharper restore ConditionIsAlwaysTrueOrFalse
                 Assert.Fail("Expected ArgumentNullException");
 
             } catch(ArgumentNullException)
@@ -79,6 +77,11 @@ namespace Welch.Brainmess
             }
         }
 
+        private static LinkedListNode<int> GetNull()
+        {
+            return null;
+        }
+
         [Test]
         public void MoveBackward_WithNullNode_ShouldThrow()
         {
index 4b84edf..bac6904 100644 (file)
@@ -15,7 +15,7 @@ namespace Welch.Brainmess
         public void JumpForward()
         {
             // Arrange
-            //                                               0123456789
+            //                                   0123456789
             Program program = Program.LoadState("++[     ]   ", 3);
 
             // Act
index 4fbf9d0..a782651 100644 (file)
@@ -37,8 +37,8 @@ namespace Welch.Brainmess
         public void FindMatch_ForwardWithNoNesting()
         {
             // Arrange
-            //                           1111111111222222
-            //                 01234567890123456789012345
+            //                                 1111111111222222
+            //                       01234567890123456789012345
             const string sequence = "abcd[   djskd dksj] dsksld";
 
             // Act