Exemple #1
0
        public void BaseTest1()
        {
            FallBackPolicy policy = new FallBackPolicy();

            Assert.False(policy.IsValid());
            Assert.Null(policy.GetSync());
            Assert.Null(policy.GetAsync());
            Assert.Equal(1, policy.Index);
        }
Exemple #2
0
        public void BaseTest3()
        {
            FallBackPolicy policy = new FallBackPolicy(func: (ct) => null);

            Assert.True(policy.IsValid());
            Assert.Null(policy.GetSync());
            Assert.NotNull(policy.GetAsync());

            Assert.Null(policy.Action);
            Assert.NotNull(policy.Func);
        }
Exemple #3
0
        public void BaseTest2()
        {
            FallBackPolicy policy = new FallBackPolicy(action: () => { });

            Assert.True(policy.IsValid());
            Assert.NotNull(policy.GetSync());
            Assert.Null(policy.GetAsync());

            Assert.NotNull(policy.Action);
            Assert.Null(policy.Func);
        }