Example #1
0
        private void AssertManagerContainsPolicies(CircuitBreakerManager instance, IDictionary <string, ICircuitBreakerPolicy> policies)
        {
            var keys = instance.GetKeys();

            Assert.AreEqual(policies.Count, keys.Count());
            foreach (var policy in policies)
            {
                Assert.IsTrue(keys.Contains(policy.Key));
            }
        }
Example #2
0
        public void GetKeys_IfDoesNotContainPolicies_ThenReturnEmptyResult()
        {
            var keys = _sut.GetKeys();

            Assert.IsEmpty(keys);
        }
Example #3
0
 private void AssertManagerContainsPolicy(CircuitBreakerManager instance, string policyName)
 {
     Assert.AreEqual(1, instance.GetKeys().Count());
     Assert.AreEqual(policyName, instance.GetKeys().ElementAt(0));
 }