Пример #1
0
        public void BaseTest1()
        {
            BreakerPolicy policy = new BreakerPolicy();

            Assert.False(policy.IsValid());
            Assert.Null(policy.GetSync());
            Assert.Null(policy.GetAsync());
            Assert.Equal(4, policy.Index);
        }
Пример #2
0
        public void BaseTest3()
        {
            BreakerPolicy policy = new BreakerPolicy(6, 5000);

            Assert.True(policy.IsValid());
            Assert.NotNull(policy.GetSync());
            Assert.NotNull(policy.GetAsync());
            Assert.Equal(6, policy.Count);
            Assert.Equal(5000, policy.Duration);
        }
Пример #3
0
        public void BaseTest2()
        {
            BreakerPolicy policy = new BreakerPolicy(6, 0);

            Assert.False(policy.IsValid());
            Assert.Null(policy.GetSync());
            Assert.Null(policy.GetAsync());

            Assert.Equal(6, policy.Count);
        }