public void when_calling_utilization_total_ram_is_calculated_accurately()
        {
            _configuration = Mock.Create <IConfiguration>();
            var service  = new UtilizationStore(_systemInfo, _dnsStatic, _configuration, _agentHealthReporter);
            var settings = service.GetUtilizationSettings();

            Assert.AreEqual(16000, settings.TotalRamMebibytes, string.Format("Expected {0}, but was {1}", 16000, settings.TotalRamMebibytes));
        }
        public void when_calling_utilization_logical_cores_are_calculated_accurately()
        {
            _configuration = Mock.Create <IConfiguration>();
            var service  = new UtilizationStore(_systemInfo, _dnsStatic, _configuration, _agentHealthReporter);
            var settings = service.GetUtilizationSettings();

            Assert.AreEqual(6, settings.LogicalProcessors, string.Format("Expected {0}, but was {1}", 8, settings.LogicalProcessors));
        }
        public void when_calling_utilization_fullhostname_is_set()
        {
            _configuration = Mock.Create <IConfiguration>();
            Mock.Arrange(() => _configuration.UtilizationFullHostName).Returns("Host-Name.Domain");
            var service  = new UtilizationStore(_systemInfo, _dnsStatic, _configuration, _agentHealthReporter);
            var settings = service.GetUtilizationSettings();

            Assert.AreEqual("Host-Name.Domain", settings.FullHostName, string.Format("Expected {0}, but was {1}", "Host-Name.Domain", settings.FullHostName));
        }
        public void when_calling_utilization_ipaddresses_is_set()
        {
            _configuration = Mock.Create <IConfiguration>();

            var service  = new UtilizationStore(_systemInfo, _dnsStatic, _configuration, _agentHealthReporter);
            var settings = service.GetUtilizationSettings();

            Assert.AreEqual(settings.IpAddress.Count, 2);
            Assert.AreEqual("127.0.0.1", settings.IpAddress[0], string.Format("Expected {0}, but was {1}", "127.0.0.1", settings.IpAddress[0]));
            Assert.AreEqual("0.0.0.0", settings.IpAddress[1], string.Format("Expected {0}, but was {1}", "0.0.0.0", settings.IpAddress[1]));
        }