示例#1
0
        public void ShouldSAndGLooseUseNew1stNullNotOk()
        {
            // TODO: AAA
            mod1 = new LooseModel(PropBagTypeSafetyMode.None, _amHelpers.StoreAccessCreator, _amHelpers.PropFactory_V1);

            mod1[typeof(object), PROP_NEW] = 0;
            Assert.That(mod1.GetTypeOfProperty(PROP_NEW), Is.EqualTo(typeof(object)));

            Assert.Throws <InvalidOperationException>(() => mod1[typeof(string), PROP_NEW] = "0");
        }
示例#2
0
        public void ShouldSAndGLooseUseNewProp()
        {
            // TODO: AAA
            mod1 = new LooseModel(PropBagTypeSafetyMode.None, _amHelpers.StoreAccessCreator, _amHelpers.PropFactory_V1);

            mod1["System.String", PROP_NEW] = "string";

            string s     = (string)mod1["System.String", PROP_NEW];
            Type   vType = mod1.GetTypeOfProperty(PROP_NEW);

            Assert.That(s, Is.EqualTo("string"));
            Assert.That(vType, Is.EqualTo(typeof(string)));
        }