public void AddMetricsToCache()
        {
            var cache = new LoadMetricsCache();
            cache.Add(new LoadMetrics("server-1", 20.2, 30.3));
            cache.Add(new LoadMetrics("server-2", 20.2, 30.3));

            Assert.Equal(1, cache.Get("server-1").Count);
            Assert.Equal(1, cache.Get("server-2").Count);
        }
        public void ReturnsEmptyCollection()
        {
            var cache = new LoadMetricsCache();
            cache.Add(new LoadMetrics("server-3", 20.2, 30.3));

            Assert.Equal(0, cache.Get("server-1").Count);
        }
        public void CheckIfCreated()
        {
            var cache = new LoadMetricsCache();
            var controller = new LoadMetricsController(cache);

            var result = controller.PostLoadMetrics("server-1", new LoadMetrics("server-1", 20.2, 54.8));
            Assert.IsType<CreatedNegotiatedContentResult<LoadMetrics>>(result);
            Assert.Equal(1, cache.Get("server-1").Count);
        }