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

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

            // Act
            memoryStatusOrchestrator.GetMemoryUtilizationInPercent(null);
        }
        public void GetMemoryUtilizationInPercent_SystemMemoryInformationParameterValuesAreZero_ValueIsZero()
        {
            // Arrange
            var systemMemoryInformation = new SystemMemoryInformation { AvailableMemoryInGB = 0d, UsedMemoryInGB = 0d };
            var memoryStatusOrchestrator = new MemoryStatusOrchestrator();

            // Act
            var result = memoryStatusOrchestrator.GetMemoryUtilizationInPercent(systemMemoryInformation);

            // Assert
            Assert.AreEqual(0d, result.Value);
        }
        public void GetMemoryUtilizationInPercent_SystemMemoryInformationParameterIsValid_NameParameterIsSet()
        {
            // Arrange
            var systemMemoryInformation = new SystemMemoryInformation();
            var memoryStatusOrchestrator = new MemoryStatusOrchestrator();

            // Act
            var result = memoryStatusOrchestrator.GetMemoryUtilizationInPercent(systemMemoryInformation);

            // Assert
            Assert.IsNotNullOrEmpty(result.Name);
        }
        public void GetMemoryUtilizationInPercent_SystemMemoryInformationParameterIsNotInitialized_ValueIsZero()
        {
            // Arrange
            var systemMemoryInformation = new SystemMemoryInformation();
            var memoryStatusOrchestrator = new MemoryStatusOrchestrator();

            // Act
            var result = memoryStatusOrchestrator.GetMemoryUtilizationInPercent(systemMemoryInformation);

            // Assert
            Assert.AreEqual(0d, result.Value);
        }
        public void GetMemoryUtilizationInPercent_SystemMemoryInformationParameterIsValid_ValueIsCorrect()
        {
            // Arrange
            var availableMemory = 9d;
            var usedMemory = 1d;
            var systemMemoryInformation = new SystemMemoryInformation { AvailableMemoryInGB = availableMemory, UsedMemoryInGB = usedMemory };
            var memoryStatusOrchestrator = new MemoryStatusOrchestrator();

            // Act
            var result = memoryStatusOrchestrator.GetMemoryUtilizationInPercent(systemMemoryInformation);

            // Assert
            Assert.AreEqual(10d, result.Value);
        }