Beispiel #1
0
        public void Expando_TryGet_Should_Not_Throw_Exception_When_Property_Doesnt_Exist()
        {
            var e = new Expando();
            e["hello"] = "world";
            var outval = "";
            Assert.True(e.TryGet<String>("hello",out outval));
            Assert.False(e.TryGet<String>("hello2", out outval));

            bool out2;
            Assert.False(e.TryGet<bool>("hello", out out2));
        }
Beispiel #2
0
        public void Expando_TryGet_Should_Not_Throw_Exception_When_Property_Doesnt_Exist()
        {
            var e = new Expando();

            e["hello"] = "world";
            var outval = "";

            Assert.True(e.TryGet <String>("hello", out outval));
            Assert.False(e.TryGet <String>("hello2", out outval));

            bool out2;

            Assert.False(e.TryGet <bool>("hello", out out2));
        }