Exemplo n.º 1
0
        public void TestAggregate()
        {
            var x = new WatchdogStatusAggregator();
            var d = new Dictionary <string, string>()
            {
                ["a"] = "Error/...",
                [WatchdogStatus.Prefix + "a"] = "Info/...",
                [WatchdogStatus.Prefix + "b"] = "Warning/...",
                [WatchdogStatus.Prefix + "c"] = "Unknown/...",
            };

            Assert.AreEqual("Warning", x.Aggregate(d));
        }
Exemplo n.º 2
0
        public void TestAggregateEmpty()
        {
            var x = new WatchdogStatusAggregator();

            Assert.AreEqual("Unknown", x.Aggregate(new Dictionary <string, string>()));
        }