示例#1
0
        public void PropertyFactory_Nested2()
        {
            IHystrixProperty <string> nullValue = HystrixPropertyFactory.NullProperty <string>();

            IHystrixProperty <string> withDefault = HystrixPropertyFactory.AsProperty(nullValue, "b");

            Assert.AreEqual("b", withDefault.Get());
        }
示例#2
0
        public void PropertyFactory_Series2()
        {
            IHystrixProperty <string> nullValue = HystrixPropertyFactory.NullProperty <string>();
            IHystrixProperty <string> a         = HystrixPropertyFactory.AsProperty(nullValue, (string)null);

            IHystrixProperty <string> withDefault = HystrixPropertyFactory.AsProperty(a, nullValue, HystrixPropertyFactory.AsProperty("b"), nullValue, HystrixPropertyFactory.AsProperty("c"));

            Assert.AreEqual("b", withDefault.Get());
        }