Exemple #1
0
        public static void MeanOfArray_GetAverage_RandomTest([Random(1, 10, 98)] int x)
        {
            List <int> l = new List <int>();
            Random     r = new Random();

            for (int i = 0; i < x; i++)
            {
                l.Add(r.Next(100) + 1);
            }
            int[] arr = l.ToArray();
            Assert.AreEqual(Solution(arr), MeanOfArray.GetAverage(arr), string.Format("Should work for {0}", string.Join(", ", l.ToArray())));
        }
Exemple #2
0
 public static int MeanOfArray_GetAverage_FixedTest(int[] marks)
 {
     return(MeanOfArray.GetAverage(marks));
 }