public void SeverNameIsEmpty()
        {
            var cache = new LoadMetricsCache();
            var controller = new LoadMetricsSummaryController(new LoadMetricsSummaryQuery(cache));

            var result = controller.GetLoadMetricsSummary("", "monthly");
            Assert.IsType<BadRequestResult>(result);
        }
        public void IntervalIsWrong()
        {
            var cache = new LoadMetricsCache();
            var controller = new LoadMetricsSummaryController(new LoadMetricsSummaryQuery(cache));

            var result = controller.GetLoadMetricsSummary("server", "monthly");
            Assert.IsType<BadRequestResult>(result);
        }
        public void CheckIsNotFound()
        {
            var cache = new LoadMetricsCache();
            var controller = new LoadMetricsSummaryController(new LoadMetricsSummaryQuery(cache));

            var result = controller.GetLoadMetricsSummary("server-1", "daily");
            Assert.IsType<NotFoundResult>(result);
        }
        public void CheckOkStatus()
        {
            var cache = new LoadMetricsCache();
            cache.Add(new LoadMetrics("server-1", 20.2, 30.3));
            var controller = new LoadMetricsSummaryController(new LoadMetricsSummaryQuery(cache));

            var result = controller.GetLoadMetricsSummary("server-1", "daily");
            Assert.IsType<OkNegotiatedContentResult<IReadOnlyCollection<LoadMetricsSummary>>>(result);
        }