public void GetRamLoads_ShouldReturnNotFound()
        {
            ServersController controller = new ServersController(true);
            var actionResult             = controller.GetRamLoads("NotAvailableServer");

            Assert.IsInstanceOfType(actionResult, typeof(NotFoundResult));
        }
        public void GetRamLoads_ShouldReturnRamLoads()
        {
            ServersController controller = new ServersController(true);

            var actionResult          = controller.GetRamLoads(Global.Utility.PopulatedServer);
            var contentResult         = actionResult as OkNegotiatedContentResult <RamLoadAveragesDto>;
            var generatedLoadAverages = Utility.TestHelper.CreateRamLoadAverages(Global.Utility.LoadRate);

            Assert.IsNotNull(contentResult.Content);
            Assert.AreEqual(true, Utility.TestHelper.AreRamLoadAveragesEqual(contentResult.Content, generatedLoadAverages));
        }
        public void GetRamLoads_ShouldReturnEmpty()
        {
            ServersController controller = new ServersController(true);
            var actionResult             = controller.GetRamLoads(Global.Utility.NewServer);
            var contentResult            = actionResult as OkNegotiatedContentResult <RamLoadAveragesDto>;
            var emptyLoad = new RamLoadAveragesDto()
            {
                AverageRamLoadsForLastHourByMinute = new double[0],
                AverageRamLoadsForLastDayByHour    = new double[0]
            };

            Assert.IsNotNull(contentResult.Content);
            Assert.AreEqual(true, Utility.TestHelper.AreRamLoadAveragesEqual(contentResult.Content, emptyLoad));
        }