Baseline.Testing.DictionaryExtensionsTester.get_complex C# (CSharp) Метод

get_complex() приватный Метод

private get_complex ( ) : void
Результат void
        public void get_complex()
        {
            var leaf = new Dictionary<string, object>{
                {"a", 1},
                {"b", true},
                {"c", false}
            };

            var node = new Dictionary<string, object>{
                {"leaf", leaf}
            };

            var top = new Dictionary<string, object>{
                {"node", node}
            };

            top.Get<int>("node/leaf/a").ShouldBe(1);
            top.Get<bool>("node/leaf/b").ShouldBeTrue();
            top.Get<bool>("node/leaf/c").ShouldBeFalse();
        }