Exemple #1
0
        public void PropertyValueTest()
        {
            dynamic d = new TesterDynamic();

            d.Property = "Property";

            string actual = GetPropertyValue(d.Property);

            Assert.AreEqual("Dynamic: Property", actual);
        }
Exemple #2
0
        private string GetRoute(dynamic values)
        {
            TesterDynamic t = values as TesterDynamic;

            if (t == null)
            {
                return(null);
            }

            return(t.GetValues()["Page"].ToString());
        }
Exemple #3
0
        public void RouteDynamicTests()
        {
            dynamic t = new TesterDynamic();

            t.Page = "default.aspx";

            int i = 0;

            string route     = GetRoute(t);
            string nullRoute = GetRoute(i);

            Assert.AreEqual("default.aspx", route);
            Assert.IsNull(nullRoute);
        }