public void GetCpuMetricsCollector_Returns_LinuxCpuMetrics_If_OS_Is_Linux() { var target = MnemoxMachineMetricsTestsHelpers.CreateMetricsManagerHelpersTarget(); var metricsCollector = target.GetCpuMetricsCollector(OSPlatform.Linux); Assert.IsType <LinuxCpuMetrics>(metricsCollector); }
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)); }
public void GetMemoryMetricsCollector_Returns_WindowsMemoryMetrics_If_OS_Is_Windows() { var target = MnemoxMachineMetricsTestsHelpers.CreateMetricsManagerHelpersTarget(); var metricsCollector = target.GetMemoryMetricsCollector(OSPlatform.Windows); Assert.IsType <WindowsMemoryMetrics>(metricsCollector); }