public void Setup()
        {
            IProcessorStatusOrchestrator processorStatusOrchestrator = new ProcessorStatusOrchestrator();
            IMemoryStatusOrchestrator memoryStatusOrchestrator = new MemoryStatusOrchestrator();
            IStorageStatusOrchestrator storageStatusOrchestrator = new StorageStatusOrchestrator();

            this.systemStatusOrchestrator = new SystemStatusOrchestrator(processorStatusOrchestrator, memoryStatusOrchestrator, storageStatusOrchestrator);
        }
        public void GetStorageUtilizationInPercent_SystemStorageInformationParameterIsNull_ArgumentNullExceptionIsThrown()
        {
            // Arrange
            var storageStatusOrchestrator = new StorageStatusOrchestrator();

            // Act
            storageStatusOrchestrator.GetStorageUtilizationInPercent(null);
        }
        public void GetStorageUtilizationInPercent_SystemStorageInformationParameterDeviceInfoPropertyIsNull_ResultIsEmpty()
        {
            // Arrange
            var systemStorageInformation = new SystemStorageInformation { StorageDeviceInfos = null };
            var storageStatusOrchestrator = new StorageStatusOrchestrator();

            // Act
            var result = storageStatusOrchestrator.GetStorageUtilizationInPercent(systemStorageInformation);

            // Assert
            Assert.IsEmpty(result);
        }
        public void GetStorageUtilizationInPercent_SystemStorageInformationParameterDeviceInfoPropertyIsNotEmpty_ValueIsInverseOfFreeDiscSpaceInPercent()
        {
            // Arrange
            var device1 = new SystemStorageDeviceInformation { DeviceName = "C:", FreeDiscSpaceInPercent = 10d };
            var systemStorageInformation = new SystemStorageInformation { StorageDeviceInfos = new[] { device1 } };
            var storageStatusOrchestrator = new StorageStatusOrchestrator();

            // Act
            var result = storageStatusOrchestrator.GetStorageUtilizationInPercent(systemStorageInformation);

            // Assert
            Assert.AreEqual(100d - device1.FreeDiscSpaceInPercent, result.First().Value);
        }
        public void GetStorageUtilizationInPercent_SystemStorageInformationParameterDeviceInfoPropertyIsNotEmpty_NameContainsDeviceName()
        {
            // Arrange
            var device1 = new SystemStorageDeviceInformation { DeviceName = "C:", FreeDiscSpaceInPercent = 10d };
            var systemStorageInformation = new SystemStorageInformation { StorageDeviceInfos = new[] { device1 } };
            var storageStatusOrchestrator = new StorageStatusOrchestrator();

            // Act
            var result = storageStatusOrchestrator.GetStorageUtilizationInPercent(systemStorageInformation);

            // Assert
            Assert.IsTrue(result.First().Name.Contains(device1.DeviceName));
        }