public void GetAverageCpuTest_MoreThenStored()
        {
            var proc = Process.GetCurrentProcess();
            ProcessStatistics stats = new ProcessStatistics(proc.Id, proc.ProcessName);

            stats.Stats.AddRange(Usage);
            var averageOf12 = stats.GetAverageCpu(12);

            Assert.IsTrue(averageOf12 == (double)(1 + 2 + 3 + 4 + 5) / 5);
        }
        public void GetAverageCpuTest()
        {
            var proc = Process.GetCurrentProcess();
            ProcessStatistics stats = new ProcessStatistics(proc.Id, proc.ProcessName);

            stats.Stats.AddRange(Usage);
            var averageOf3 = stats.GetAverageCpu(3);

            Assert.IsTrue(averageOf3 == (double)(3 + 4 + 5) / 3);
        }