Beispiel #1
0
        public void Task8418Test()
        {
            List <int> expected = new List <int> {
                1, 2, 3, 6
            };
            List <int> actual = Lab06.Task8418(6);

            CollectionAssert.AreEqual(expected, actual);

            expected = new List <int> {
                1, 5, 7, 11, 35, 55, 77, 385
            };
            actual = Lab06.Task8418(385);
            CollectionAssert.AreEqual(expected, actual);
        }
Beispiel #2
0
 private static void Step8418()
 {
     Console.WriteLine();
     Console.WriteLine("8418");
     int[] in8418 = { 6, 385, 0, -9 };
     for (int i = 0; i < in8418.Length; i++)
     {
         try
         {
             var result = Lab06.Task8418(in8418[i]);
             Console.WriteLine(String.Join(" ", result));
         }
         catch (Exception e)
         {
             Console.WriteLine(e.Message);
         }
     }
 }
Beispiel #3
0
 public void ShouldNotAcceptZero()
 {
     Lab06.Task8418(0);
 }
Beispiel #4
0
 public void ShouldNotAcceptNegativeArg()
 {
     Lab06.Task8418(-9);
 }