Пример #1
0
        public void ProcStatParser(string procStatContent, long expectedIdle, long expectedTotal)
        {
            using var systemTotalCpuProvider = new TestSystemTotalCpuProvider(procStatContent);
            var(success, idle, total)        = systemTotalCpuProvider.ReadProcStat();

            success.Should().BeTrue();
            idle.Should().Be(expectedIdle);
            total.Should().Be(expectedTotal);
        }
        public void ProcStatParser(string procStatContent, long expectedIdle, long expectedTotal)
        {
            var systemTotalCpuProvider = new TestSystemTotalCpuProvider(procStatContent);
            var res = systemTotalCpuProvider.ReadProcStat();

            res.success.Should().BeTrue();
            res.idle.Should().Be(expectedIdle);
            res.total.Should().Be(expectedTotal);
        }