Esempio n. 1
0
        public void GetCpuMetricsCollector_Returns_LinuxCpuMetrics_If_OS_Is_Linux()
        {
            var target = MnemoxMachineMetricsTestsHelpers.CreateMetricsManagerHelpersTarget();

            var metricsCollector = target.GetCpuMetricsCollector(OSPlatform.Linux);

            Assert.IsType <LinuxCpuMetrics>(metricsCollector);
        }
Esempio n. 2
0
        public void GetMetricsCollector_ThrowsError_If_OS_unsupported()
        {
            var target = MnemoxMachineMetricsTestsHelpers.CreateMetricsManagerHelpersTarget();

            Assert.Throws <PlatformNotSupportedException>(() => target.GetMemoryMetricsCollector(OSPlatform.OSX));

            Assert.Throws <PlatformNotSupportedException>(() => target.GetMemoryMetricsCollector(OSPlatform.FreeBSD));
        }
Esempio n. 3
0
        public void GetMemoryMetricsCollector_Returns_WindowsMemoryMetrics_If_OS_Is_Windows()
        {
            var target = MnemoxMachineMetricsTestsHelpers.CreateMetricsManagerHelpersTarget();

            var metricsCollector = target.GetMemoryMetricsCollector(OSPlatform.Windows);

            Assert.IsType <WindowsMemoryMetrics>(metricsCollector);
        }